summaryrefslogtreecommitdiff
path: root/xmake/modules/package/tools/xmake.lua
diff options
context:
space:
mode:
authorstar9029 <[email protected]>2024-08-29 16:50:29 +0800
committerstar9029 <[email protected]>2024-08-29 16:50:29 +0800
commit94829508d57ac49bcd0cecc3a6de6f5afcdf921c (patch)
treee8805e499a0b4117627324c7d319f5454b49bd71 /xmake/modules/package/tools/xmake.lua
parent87630c8cf33105cc8c000e73cb7b67a2decfe02d (diff)
Support multiple targets for package
Diffstat (limited to 'xmake/modules/package/tools/xmake.lua')
-rw-r--r--xmake/modules/package/tools/xmake.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/xmake/modules/package/tools/xmake.lua b/xmake/modules/package/tools/xmake.lua
index dbe417a80..b9cf605ce 100644
--- a/xmake/modules/package/tools/xmake.lua
+++ b/xmake/modules/package/tools/xmake.lua
@@ -517,16 +517,18 @@ function install(package, configs, opt)
if njob then
table.insert(argv, "--jobs=" .. njob)
end
- if opt.target then
- table.insert(argv, opt.target)
+ local target = table.wrap(opt.target)
+ if #target ~= 0 then
+ table.join2(argv, target)
end
os.vrunv(os.programfile(), argv, {envs = envs})
-- do install
argv = {"install", "-y", "--nopkgs", "-o", package:installdir()}
_set_builtin_argv(package, argv)
- if opt.target then
- table.insert(argv, opt.target)
+ local target = table.wrap(opt.target)
+ if #target ~= 0 then
+ table.join2(argv, target)
end
os.vrunv(os.programfile(), argv, {envs = envs})
end