aboutsummaryrefslogtreecommitdiff
path: root/xmake.lua
diff options
context:
space:
mode:
authorMartin Ridgers <[email protected]>2021-11-17 13:23:49 +0100
committerMartin Ridgers <[email protected]>2021-11-17 13:23:49 +0100
commit80368129549445f109c37085104ee81b54c38670 (patch)
tree72a54f85c083e5ba2e1a338be05caeb19e7d0078 /xmake.lua
parentFixed use of undefined preprocessor macro (diff)
downloadzen-80368129549445f109c37085104ee81b54c38670.tar.xz
zen-80368129549445f109c37085104ee81b54c38670.zip
Turned USE_SENTRY and ZEN_MIMALLOC into xmake config options
Diffstat (limited to 'xmake.lua')
-rw-r--r--xmake.lua21
1 files changed, 19 insertions, 2 deletions
diff --git a/xmake.lua b/xmake.lua
index da688cbb3..d7c46d684 100644
--- a/xmake.lua
+++ b/xmake.lua
@@ -61,8 +61,25 @@ if is_os("linux") then
add_cxxflags("-Wno-missing-field-initializers")
end
-add_defines("USE_SENTRY=1")
-add_defines("ZEN_USE_MIMALLOC=1")
+function add_define_by_config(define, config_name)
+ local value = has_config(config_name) and 1 or 0
+ add_defines(define.."="..value)
+ print(define.."="..value)
+end
+
+option("zensentry")
+ set_default(true)
+ set_showmenu(true)
+ set_description("Enables Sentry support in Zen")
+option_end()
+add_define_by_config("USE_SENTRY", "zensentry")
+
+option("zenmimalloc")
+ set_default(true)
+ set_showmenu(true)
+ set_description("Use MiMalloc as Zen's allocator")
+option_end()
+add_define_by_config("ZEN_USE_MIMALLOC", "zenmimalloc")
if is_os("windows") then
option("vfs")