From 9c161e7f113de8c020df176c1fab87e8c93083f5 Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 20 May 2015 08:50:04 +0800 Subject: make config for the current target --- xmake/scripts/base/project.lua | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'xmake/scripts/base/project.lua') 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 -- cgit v1.3.1