summaryrefslogtreecommitdiff
path: root/xmake/actions/install/install.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2022-06-13 22:43:03 +0800
committerruki <[email protected]>2022-06-13 22:43:03 +0800
commit736d72fc583f3a7c5f8f97c6079db2847da7757e (patch)
tree8a33445497209f03a90620f9eb2d9fce9157fa16 /xmake/actions/install/install.lua
parentb871678de09d8185e6e13b05e726e56b72ad696a (diff)
support group for xmake install
Diffstat (limited to 'xmake/actions/install/install.lua')
-rw-r--r--xmake/actions/install/install.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/xmake/actions/install/install.lua b/xmake/actions/install/install.lua
index b4b0a6628..4b100a8e2 100644
--- a/xmake/actions/install/install.lua
+++ b/xmake/actions/install/install.lua
@@ -106,7 +106,7 @@ function _install_targets(targets)
end
-- install targets
-function main(targetname)
+function main(targetname, group_pattern)
-- install the given target?
if targetname and not targetname:startswith("__") then
@@ -116,7 +116,8 @@ function main(targetname)
else
-- install default or all targets
for _, target in ipairs(project.ordertargets()) do
- if target:is_default() or targetname == "__all" then
+ local group = target:get("group")
+ if (target:is_default() and not group_pattern) or targetname == "__all" or (group_pattern and group and group:match(group_pattern)) then
_install_target(target)
end
end