summaryrefslogtreecommitdiff
path: root/core/xmake.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2020-07-17 16:02:19 +0800
committerGitHub <[email protected]>2020-07-17 16:02:19 +0800
commitf9a4493f60eeb9078c00a112734d8caa7e29604e (patch)
tree9fd76a4b3ee0fea7eaa28dbf0df3976c3db36b34 /core/xmake.lua
parentc3dd85b98492c012fc4eb1b46fac824051a1b92a (diff)
parent6b3cf4e5239f3f041501d0d8ee32471f33010708 (diff)
Merge pull request #894 from xmake-io/json
Add Json Support
Diffstat (limited to 'core/xmake.lua')
-rw-r--r--core/xmake.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/core/xmake.lua b/core/xmake.lua
index 2f1f43957..4ce9c637b 100644
--- a/core/xmake.lua
+++ b/core/xmake.lua
@@ -15,6 +15,12 @@ set_languages("c99", "cxx11")
-- add release and debug modes
add_rules("mode.release", "mode.debug")
+if is_mode("release") then
+ set_optimize("smallest")
+ if is_plat("windows") then
+ add_ldflags("/LTCG")
+ end
+end
-- disable some compiler errors
add_cxflags("-Wno-error=deprecated-declarations", "-fno-strict-aliasing", "-Wno-error=nullability-completeness", "-Wno-error=parentheses-equality")
@@ -76,7 +82,7 @@ if is_plat("windows") then
end
-- add projects
-includes("src/lcurses", "src/sv","src/luajit", "src/tbox", "src/xmake", "src/demo")
+includes("src/lua-cjson", "src/lcurses", "src/sv","src/luajit", "src/tbox", "src/xmake", "src/demo")
if is_plat("windows") then
includes("src/pdcurses")
end