summaryrefslogtreecommitdiff
path: root/xmake/scripts/base/project.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2015-05-20 08:50:04 +0800
committerruki <[email protected]>2015-05-20 08:50:04 +0800
commit9c161e7f113de8c020df176c1fab87e8c93083f5 (patch)
tree3946ab2b828aa9365619eb07ed0d51b6f1fd721d /xmake/scripts/base/project.lua
parentbf3130929b7cf628dad0300a835e13c7bb91feb0 (diff)
make config for the current target
Diffstat (limited to 'xmake/scripts/base/project.lua')
-rw-r--r--xmake/scripts/base/project.lua12
1 files changed, 3 insertions, 9 deletions
diff --git a/xmake/scripts/base/project.lua b/xmake/scripts/base/project.lua
index 559501e00..49088fca4 100644
--- a/xmake/scripts/base/project.lua
+++ b/xmake/scripts/base/project.lua
@@ -55,8 +55,7 @@ function project.loadxproj(file)
-- init filter
local filter = function (v)
if v == "buildir" then
- local target = config.target()
- return utils.ifelse(target, target.output, nil);
+ return config.get("buildir")
elseif v == "projectdir" then
return xmake._PROJECT_DIR
end
@@ -73,13 +72,8 @@ function project.loadxproj(file)
local configs = {}
-- get the config for the current target
- local target = config.target()
- if target then
- for k, v in pairs(target) do
- if k and type(k) == "string" and not k:startswith("_") then
- configs[k] = v
- end
- end
+ for k, v in pairs(config._CURRENT) do
+ configs[k] = v
end
-- init the project directory