summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2022-05-02 23:10:09 +0800
committerruki <[email protected]>2022-05-02 23:10:09 +0800
commit0938467b411d557a2012b03ae7d6f377bc783ac6 (patch)
tree166852c88d7428df165500ef438b2a6679f75305
parent8c76018e3ff63b122fbd5fe64bae780f9b4ee19e (diff)
pass target to tools/xmake
-rw-r--r--xmake/modules/package/tools/xmake.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/xmake/modules/package/tools/xmake.lua b/xmake/modules/package/tools/xmake.lua
index b521b5a84..6e98adc7b 100644
--- a/xmake/modules/package/tools/xmake.lua
+++ b/xmake/modules/package/tools/xmake.lua
@@ -233,12 +233,18 @@ function install(package, configs, opt)
os.vrunv("xmake", argv, {envs = envs})
-- do build
- argv = {}
+ argv = {"build"}
_set_builtin_argv(argv)
+ if opt.target then
+ table.insert(argv, opt.target)
+ end
os.vrunv("xmake", argv, {envs = envs})
-- do install
argv = {"install", "-y", "-o", package:installdir()}
_set_builtin_argv(argv)
+ if opt.target then
+ table.insert(argv, opt.target)
+ end
os.vrunv("xmake", argv, {envs = envs})
end