diff options
| author | Martin Ridgers <[email protected]> | 2021-11-17 13:23:49 +0100 |
|---|---|---|
| committer | Martin Ridgers <[email protected]> | 2021-11-17 13:23:49 +0100 |
| commit | 80368129549445f109c37085104ee81b54c38670 (patch) | |
| tree | 72a54f85c083e5ba2e1a338be05caeb19e7d0078 /xmake.lua | |
| parent | Fixed use of undefined preprocessor macro (diff) | |
| download | zen-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.lua | 21 |
1 files changed, 19 insertions, 2 deletions
@@ -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") |