summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/modules/package/tools/gn.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/xmake/modules/package/tools/gn.lua b/xmake/modules/package/tools/gn.lua
index 461f43259..568b881bb 100644
--- a/xmake/modules/package/tools/gn.lua
+++ b/xmake/modules/package/tools/gn.lua
@@ -124,8 +124,8 @@ function build(package, configs, opt)
-- do build
local buildir = _get_buildir(opt)
- local argv = opt.argv or {}
- ninja.build(package, argv, {buildir = buildir, envs = opt.envs or buildenvs(package, opt)})
+ local targets = table.wrap(opt.target)
+ ninja.build(package, targets, {buildir = buildir, envs = opt.envs or buildenvs(package, opt)})
end
-- install package
@@ -137,5 +137,6 @@ function install(package, configs, opt)
-- do build and install
local buildir = _get_buildir(opt)
- ninja.install(package, {}, {buildir = buildir, envs = opt.envs or buildenvs(package, opt)})
+ local targets = table.wrap(opt.target)
+ ninja.install(package, targets, {buildir = buildir, envs = opt.envs or buildenvs(package, opt)})
end