windiws开发 linux生产,是一套综合起来比较好的做法,premake5 可通过lua脚本配置自动化生成vs工程和gmake工程,方便在linux和windows下开发和编译。
下面是一个例子,解决方案server 工程stick_engine 和app,其中stick_engine是生成静态库app生成可执行文件。
--[[
premake5.lua
windows: premake5.exe --os=windows vs2015
linux: premake5.exe --os=linux gmake
]]
workspace "server"
location (_ACTION) -- subdir vs2015 (or gmake, ...)
configurations { "Release", "Debug" }
platforms { "x64"}
targetdir "../bin/%{cfg.platform}/%{cfg.buildcfg}"
language "C++"
flags {
"C++11",
"StaticRuntime",
}
includedirs {
"../src/stick_engine",
"../src/stick_engine/3rd",
"../src/app",
"../deps/include",
"