diff options
| author | ruki <[email protected]> | 2015-06-02 11:55:07 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2015-06-02 11:55:07 +0800 |
| commit | 1c87d48b17adb5a43076b2a7725582703a49701a (patch) | |
| tree | ef6a2a253dde751387924761591d3b5617c75d43 /xmake/scripts/base | |
| parent | e1498eebcd687db0ccd8786906746642a173c01a (diff) | |
replace single project config
Diffstat (limited to 'xmake/scripts/base')
| -rw-r--r-- | xmake/scripts/base/project.lua | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/xmake/scripts/base/project.lua b/xmake/scripts/base/project.lua index 1ed00372b..888283562 100644 --- a/xmake/scripts/base/project.lua +++ b/xmake/scripts/base/project.lua @@ -69,7 +69,7 @@ function project._make_configs(scope, configs) end -- append configure to scope - elseif not k:startswith("_") then + elseif not k:startswith("_") and k:endswith("s") then -- wrap it first local values = utils.wrap(v) @@ -84,6 +84,20 @@ function project._make_configs(scope, configs) -- append it item[table.getn(item) + 1] = _v end + -- replace configure to scope + elseif not k:startswith("_") then + + -- wrap it first + local values = utils.wrap(v) + if table.getn(values) == 1 then + + -- the configure item + scope[k] = scope[k] or {} + local item = scope[k] + + -- replace it + item[1] = values[1] + end end end end |
