1 Star 0 Fork 0

2144/cocoyaxi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
xmake.lua 2.21 KB
一键复制 编辑 原始数据 按行查看 历史
TingfengGu 提交于 2022-11-10 21:25 . fix xmake.lua
-- plat
set_config("plat", os.host())
-- project
set_project("co")
-- set xmake minimum version
set_xmakever("2.3.1")
-- set common flags
set_languages("c++11")
set_warnings("all") -- -Wall
--set_symbols("debug") -- dbg symbols
add_rules("mode.debug", "mode.release")
if is_plat("windows") then
set_optimize("fastest") -- faster: -O2 fastest: -Ox none: -O0
add_cxflags("/EHsc")
add_ldflags("/SAFESEH:NO")
if is_mode("debug") then
set_runtimes("MTd")
else
set_runtimes("MT")
end
elseif is_plat("mingw") then
add_ldflags("-static-libgcc -static-libstdc++ -Wl,-Bstatic -lstdc++ -lwinpthread -Wl,-Bdynamic", {force = true})
set_optimize("faster")
else
set_optimize("faster") -- faster: -O2 fastest: -O3 none: -O0
--add_cxflags("-Wno-narrowing", "-Wno-sign-compare", "-Wno-strict-aliasing")
if is_plat("macosx", "iphoneos") then
add_cxflags("-fno-pie")
end
end
-- build with openssl 1.1.0+
option("with_openssl")
set_default(false)
set_showmenu(true)
set_description("build with openssl, 1.1.0+ required")
option_end()
-- build with libcurl (openssl, zlib also required)
option("with_libcurl")
set_default(false)
set_showmenu(true)
set_description("build with libcurl, required by http::Client")
option_end()
option("with_backtrace")
set_default(false)
set_showmenu(true)
set_description("build with libbacktrace, for stack trace on linux/mac")
option_end()
-- build with -fPIC
option("fpic")
set_default(false)
set_showmenu(true)
set_description("build with -fPIC")
add_cxflags("-fPIC")
option_end()
if has_config("with_libcurl") then
add_requires("openssl >=1.1.0")
add_requires("libcurl", {configs = {openssl = true, zlib = true}})
elseif has_config("with_openssl") then
add_requires("openssl >=1.1.0")
end
if has_config("with_backtrace") then
add_requires("libbacktrace")
end
-- include dir
add_includedirs("include")
-- install header files
add_installfiles("(include/**)", {prefixdir = ""})
add_installfiles("*.md", {prefixdir = "include/co"})
-- include sub-projects
includes("src", "gen", "test", "unitest")
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/iamherer/cocoyaxi.git
git@gitee.com:iamherer/cocoyaxi.git
iamherer
cocoyaxi
cocoyaxi
main

搜索帮助

0d507c66 1850385 C8b1a773 1850385