Allow user define BX_CONFIG_*

This commit is contained in:
Cloud Wu
2020-05-28 14:32:23 +08:00
committed by Бранимир Караџић
parent 4e0267fae7
commit 7bf14f0bac

View File

@@ -3,6 +3,18 @@
-- License: https://github.com/bkaradzic/bx#license-bsd-2-clause
--
local function userdefines()
local defines = {}
local BX_CONFIG = os.getenv("BX_CONFIG")
if BX_CONFIG then
for def in BX_CONFIG:gmatch "[^%s:]+" do
table.insert(defines, "BX_CONFIG_" .. def)
end
end
return defines
end
project "bx"
kind "StaticLib"
@@ -18,6 +30,8 @@ project "bx"
path.join(BX_DIR, "scripts/**.natvis"),
}
defines (userdefines())
configuration { "Debug" }
defines {
"BX_CONFIG_DEBUG=1",