summaryrefslogtreecommitdiff
path: root/xmake/core/project/project.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2019-02-13 00:04:36 +0800
committerruki <[email protected]>2019-02-12 18:27:38 +0800
commit51adca823e85369ccbd5db013e1e255a27c8bdf6 (patch)
treebdd76936d1e8afaf9830a8fd7b97a18ef0ed2384 /xmake/core/project/project.lua
parent960c3dc469aaa27746c0a2174f235bd32ce390ff (diff)
improve interpreter and restore project.version
Diffstat (limited to 'xmake/core/project/project.lua')
-rw-r--r--xmake/core/project/project.lua19
1 files changed, 17 insertions, 2 deletions
diff --git a/xmake/core/project/project.lua b/xmake/core/project/project.lua
index f7b499113..a0ea2b064 100644
--- a/xmake/core/project/project.lua
+++ b/xmake/core/project/project.lua
@@ -327,8 +327,23 @@ function project._load(force)
return false, (errors or "load project file failed!")
end
- -- load the project info
- project._INFO = project._load_scope(nil, true, true)
+ -- load the root info of the project
+ local rootinfo, errors = project._load_scope("root", true, true)
+ if not rootinfo then
+ return false, errors
+ end
+
+ -- load the root info of the target
+ local rootinfo_target, errors = project._load_scope("root.target", true, true)
+ if not rootinfo_target then
+ return false, errors
+ end
+
+ -- save the root info
+ for name, value in pairs(rootinfo_target) do
+ rootinfo["target." .. name] = value
+ end
+ project._INFO = rootinfo
-- leave the project directory
oldir, errors = os.cd(oldir)