summaryrefslogtreecommitdiff
path: root/xmake/modules/package/tools/gn.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/modules/package/tools/gn.lua')
-rw-r--r--xmake/modules/package/tools/gn.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/modules/package/tools/gn.lua b/xmake/modules/package/tools/gn.lua
index 5558860c6..5d6815c8e 100644
--- a/xmake/modules/package/tools/gn.lua
+++ b/xmake/modules/package/tools/gn.lua
@@ -127,7 +127,7 @@ function build(package, configs, opt)
-- do build
local builddir = _get_builddir(opt)
- local targets = table.wrap(opt.target)
+ local targets = table.wrap(opt.target or opt.targets)
ninja.build(package, targets, {builddir = builddir, envs = opt.envs or buildenvs(package, opt)})
end
@@ -140,6 +140,6 @@ function install(package, configs, opt)
-- do build and install
local builddir = _get_builddir(opt)
- local targets = table.wrap(opt.target)
+ local targets = table.wrap(opt.target or opt.targets)
ninja.install(package, targets, {builddir = builddir, envs = opt.envs or buildenvs(package, opt)})
end