summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/modules/package/tools/cmake.lua3
-rw-r--r--xmake/modules/package/tools/ninja.lua2
2 files changed, 2 insertions, 3 deletions
diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua
index 6be6b5952..3134fa8b4 100644
--- a/xmake/modules/package/tools/cmake.lua
+++ b/xmake/modules/package/tools/cmake.lua
@@ -1110,8 +1110,7 @@ function _build_for_ninja(package, configs, opt)
_fix_pdbdir_for_ninja(package)
ninja.build(package, {}, {envs = opt.envs or buildenvs(package, opt),
jobs = opt.jobs,
- target = opt.target,
- targets = opt.targets})
+ targets = opt.target or opt.targets})
end
-- do build for cmake/build
diff --git a/xmake/modules/package/tools/ninja.lua b/xmake/modules/package/tools/ninja.lua
index 5905e326c..168266c47 100644
--- a/xmake/modules/package/tools/ninja.lua
+++ b/xmake/modules/package/tools/ninja.lua
@@ -31,7 +31,7 @@ function _default_argv(package, configs, opt)
end
local argv = {}
- local targets = opt.targets or table.wrap(opt.target)
+ local targets = table.wrap(opt.targets or opt.target)
if #targets ~= 0 then
table.join2(argv, targets)
end