From 80368129549445f109c37085104ee81b54c38670 Mon Sep 17 00:00:00 2001 From: Martin Ridgers Date: Wed, 17 Nov 2021 13:23:49 +0100 Subject: Turned USE_SENTRY and ZEN_MIMALLOC into xmake config options --- xmake.lua | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'xmake.lua') 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") -- cgit v1.2.3