summaryrefslogtreecommitdiff
path: root/xmake/actions/config/config_h.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/actions/config/config_h.lua')
-rwxr-xr-xxmake/actions/config/config_h.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/xmake/actions/config/config_h.lua b/xmake/actions/config/config_h.lua
index cdd18c5dc..585e651d5 100755
--- a/xmake/actions/config/config_h.lua
+++ b/xmake/actions/config/config_h.lua
@@ -80,7 +80,11 @@ function _make_for_target(files, target)
if #defines ~= 0 then
file:print("// defines")
for _, define in ipairs(defines) do
- file:print("#define %s 1", define:gsub("=", " "):gsub("%$%((.-)%)", function (w) if w == "prefix" then return prefix end end))
+ if define:find("=") then
+ file:print("#define %s", define:gsub("=", " "):gsub("%$%((.-)%)", function (w) if w == "prefix" then return prefix end end))
+ else
+ file:print("#define %s 1", define:gsub("%$%((.-)%)", function (w) if w == "prefix" then return prefix end end))
+ end
end
file:print("")
end