diff options
| author | ruki <[email protected]> | 2015-06-26 11:35:29 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2015-06-26 11:35:29 +0800 |
| commit | 37247cc86d31c6134deca9819f9ffe8cfe253797 (patch) | |
| tree | 7787052bb60bfa86bab771513ef7015d9b7c8660 /xmake/scripts/base | |
| parent | cd530f704a361fecba459bc8e3dc27cb1c6522c8 (diff) | |
set package script to project
Diffstat (limited to 'xmake/scripts/base')
| -rw-r--r-- | xmake/scripts/base/package.lua | 30 | ||||
| -rw-r--r-- | xmake/scripts/base/project.lua | 3 |
2 files changed, 29 insertions, 4 deletions
diff --git a/xmake/scripts/base/package.lua b/xmake/scripts/base/package.lua index d07f6590a..d2018573d 100644 --- a/xmake/scripts/base/package.lua +++ b/xmake/scripts/base/package.lua @@ -27,6 +27,21 @@ local package = package or {} local os = require("base/os") local path = require("base/path") local utils = require("base/utils") +local config = require("base/config") +local platform = require("platform/platform") + +-- package info from the given info configure +function package._done_target(name, info) + + -- check + assert(name and info) + + -- dump + utils.dump(info) + + -- ok + return true +end -- done package from the configure function package.done(configs) @@ -34,9 +49,18 @@ function package.done(configs) -- check assert(configs) - -- dump - utils.dump(configs) - + -- package targets + for name, info in pairs(configs) do + + -- package it + if not package._done_target(name, info) then + -- errors + utils.error("package %s failed!", name) + return false + end + + end + -- ok return true end diff --git a/xmake/scripts/base/project.lua b/xmake/scripts/base/project.lua index c5052dd19..b424c8988 100644 --- a/xmake/scripts/base/project.lua +++ b/xmake/scripts/base/project.lua @@ -1061,7 +1061,8 @@ function project._load_targets(file) , "symbols" , "warnings" , "optimize" - , "languages"} + , "languages" + , "pkgscript"} for _, interface in ipairs(interfaces) do newenv["set_" .. interface] = function (...) return project._api_set_values(newenv._TARGET or newenv._CONFIGS._SET, interface, ...) end |
