summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2022-02-22 23:04:51 +0800
committerruki <[email protected]>2022-02-22 12:30:48 +0800
commita4aa0f5d1a9f16fe86200cea9798417fee4f36e7 (patch)
treeeee5cd8e2f14fed105136cf989009acee9afb4ab
parent25b856d49bd8c0531fe3a065f54922142390da8e (diff)
fix ninja.install
-rw-r--r--xmake/modules/package/tools/ninja.lua9
1 files changed, 7 insertions, 2 deletions
diff --git a/xmake/modules/package/tools/ninja.lua b/xmake/modules/package/tools/ninja.lua
index 30eb7ca64..d61e144b2 100644
--- a/xmake/modules/package/tools/ninja.lua
+++ b/xmake/modules/package/tools/ninja.lua
@@ -49,9 +49,14 @@ end
function install(package, configs, opt)
opt = opt or {}
local buildir = opt.buildir or os.curdir()
- local njob = tostring(os.default_njob())
+ local njob = opt.jobs or option.get("jobs") or tostring(os.default_njob())
local ninja = assert(find_tool("ninja"), "ninja not found!")
- local argv = {"install", "-C", buildir}
+ local argv = {"install"}
+ if opt.target then
+ table.insert(argv, opt.target)
+ end
+ table.insert(argv, "-C")
+ table.insert(argv, buildir)
if option.get("verbose") then
table.insert(argv, "-v")
end