diff options
| author | ruki <[email protected]> | 2016-06-17 22:35:02 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2016-06-17 22:35:02 +0800 |
| commit | 432fd6a40018f4c29e08f1d4cadf1ccc387a0cff (patch) | |
| tree | 990e47f68fc9287433016020294f92d93dc39e42 /xmake | |
| parent | 425b7950bc81eb88c349ecbb190e02b1558fbbed (diff) | |
fix generate defines bug for config.hv2.0.1
Diffstat (limited to 'xmake')
| -rwxr-xr-x | xmake/actions/config/config_h.lua | 6 |
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 |
