diff options
| author | ruki <[email protected]> | 2018-09-16 22:46:42 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-09-16 22:46:42 +0800 |
| commit | 95cc8416fb712fca35223f3ec5b94f91b4402f66 (patch) | |
| tree | 47aae659e13e9cd98551c5c272b3a35ab339eabd | |
| parent | 8d58658bcbb776bb2bbc201c7c8cfab69e46acb2 (diff) | |
add config args for package.builder.xmake
| -rw-r--r-- | xmake/modules/package/builder/xmake.lua | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/xmake/modules/package/builder/xmake.lua b/xmake/modules/package/builder/xmake.lua index 500bdf846..1120d8f00 100644 --- a/xmake/modules/package/builder/xmake.lua +++ b/xmake/modules/package/builder/xmake.lua @@ -26,10 +26,12 @@ import("core.base.option") -- build package -function build(package) +function build(package, configs) + + -- inherit builtin configs local argv = {"f", "-y"} - local configs = {"plat", "arch", "ndk", "ndk_sdkver", "vs", "sdk", "bin", "cross", "ld", "sh", "ar", "cc", "cxx", "mm", "mxx"} - for _, name in ipairs(configs) do + local names = {"plat", "arch", "ndk", "ndk_sdkver", "vs", "sdk", "bin", "cross", "ld", "sh", "ar", "cc", "cxx", "mm", "mxx"} + for _, name in ipairs(names) do local value = get_config(name) if value ~= nil then if value:find(" ", 1, true) then @@ -39,7 +41,9 @@ function build(package) end end table.insert(argv, "--mode=" .. (is_mode("debug") and "debug" or "release")) - for name, value in pairs(package:configs()) do + + -- inherit require and option configs + for name, value in pairs(table.join(package:configs() or {}, configs or {})) do value = tostring(value) if value:find(" ", 1, true) then value = '"' .. value .. '"' |
