From 0938467b411d557a2012b03ae7d6f377bc783ac6 Mon Sep 17 00:00:00 2001 From: ruki Date: Mon, 2 May 2022 23:10:09 +0800 Subject: pass target to tools/xmake --- xmake/modules/package/tools/xmake.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 -- cgit v1.3.1