diff options
| author | star9029 <[email protected]> | 2024-08-29 16:50:29 +0800 |
|---|---|---|
| committer | star9029 <[email protected]> | 2024-08-29 16:50:29 +0800 |
| commit | 94829508d57ac49bcd0cecc3a6de6f5afcdf921c (patch) | |
| tree | e8805e499a0b4117627324c7d319f5454b49bd71 /xmake/modules/package/tools/xmake.lua | |
| parent | 87630c8cf33105cc8c000e73cb7b67a2decfe02d (diff) | |
Support multiple targets for package
Diffstat (limited to 'xmake/modules/package/tools/xmake.lua')
| -rw-r--r-- | xmake/modules/package/tools/xmake.lua | 10 |
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 |
