diff options
| author | ruki <[email protected]> | 2015-06-10 11:51:06 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2015-06-10 11:51:06 +0800 |
| commit | 21829afa8efa18ca57e4bd9b322c6be1f84d392d (patch) | |
| tree | e3af545e1c76f83824fbd63f8f0043363252cd9f /xmake/scripts/base/project.lua | |
| parent | 177400e62e74d5ad3539573cfd3143cd19d3d30f (diff) | |
fix merge option and config for boolean value
Diffstat (limited to 'xmake/scripts/base/project.lua')
| -rw-r--r-- | xmake/scripts/base/project.lua | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/xmake/scripts/base/project.lua b/xmake/scripts/base/project.lua index 27041ac81..7b04c7fd0 100644 --- a/xmake/scripts/base/project.lua +++ b/xmake/scripts/base/project.lua @@ -341,14 +341,14 @@ function project._make(configs) -- merge the setted configures for k, v in pairs(configs._SET) do - if not target[k] then + if nil == target[k] then target[k] = v end end -- merge the added configures for k, v in pairs(configs._ADD) do - if not target[k] then + if nil == target[k] then target[k] = v else target[k] = table.join(v, target[k]) @@ -568,8 +568,7 @@ function project.menu() -- the default local default = utils.unwrap(opt.default) - if default then default = "true" - else default = "auto" end + if not default then default = "auto" end -- append it table.insert(menu, {nil, name, "kv", default, utils.unwrap(opt.description)}) |
