aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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")