summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis Poirier <[email protected]>2025-02-12 20:07:32 +0100
committerLouis Poirier <[email protected]>2025-02-12 20:07:32 +0100
commitba1e2a56445a3e34a38eda7f8f1b24f1870f867e (patch)
tree35ed9f5e43a7f04c7ab20758bf3b26fd5e535768
parent39a7e8b21849bf1102f0d71ca35fc2e65b5946fd (diff)
feat: improve GN tool for build/install commands
- rename option from argv to target, follows usage of ninja. - add option in install command.
-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