summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2020-12-29 23:14:06 +0800
committerruki <[email protected]>2020-12-29 23:14:06 +0800
commita5cc662eb1b570e02512706019b7bb1082a2155f (patch)
tree252dd91b4e0305372fecab2dec70452fc0696f65
parent729564c443fe59ece8fa481db2693f4f1b4c1498 (diff)
impl subgroup for vsxmake
-rw-r--r--xmake/plugins/project/vsxmake/getinfo.lua7
-rw-r--r--xmake/plugins/project/vsxmake/vsproj/templates/sln/SubGroupConfig(group)1
-rw-r--r--xmake/plugins/project/vsxmake/vsproj/templates/sln/vsxmake.sln3
3 files changed, 9 insertions, 2 deletions
diff --git a/xmake/plugins/project/vsxmake/getinfo.lua b/xmake/plugins/project/vsxmake/getinfo.lua
index 1eb6bad19..103ee5a56 100644
--- a/xmake/plugins/project/vsxmake/getinfo.lua
+++ b/xmake/plugins/project/vsxmake/getinfo.lua
@@ -271,10 +271,15 @@ function _make_vsinfo_groups()
if not target:isphony() then
local group_path = target:get("group")
if group_path then
- for _, group_name in ipairs(path.split(group_path)) do
+ local group_names = path.split(group_path)
+ for idx, group_name in ipairs(group_names) do
local group = groups[group_name] or {}
group.group = group_name
group.group_id = hash.uuid4(group_name)
+ if idx > 1 then
+ local parent_group_name = group_names[idx - 1]
+ group.parent_group_id = hash.uuid4(parent_group_name)
+ end
groups[group_name] = group
end
end
diff --git a/xmake/plugins/project/vsxmake/vsproj/templates/sln/SubGroupConfig(group) b/xmake/plugins/project/vsxmake/vsproj/templates/sln/SubGroupConfig(group)
new file mode 100644
index 000000000..95015762a
--- /dev/null
+++ b/xmake/plugins/project/vsxmake/vsproj/templates/sln/SubGroupConfig(group)
@@ -0,0 +1 @@
+ {#group_id#} = {#parent_group_id#}
diff --git a/xmake/plugins/project/vsxmake/vsproj/templates/sln/vsxmake.sln b/xmake/plugins/project/vsxmake/vsproj/templates/sln/vsxmake.sln
index 13678b34b..693ed4793 100644
--- a/xmake/plugins/project/vsxmake/vsproj/templates/sln/vsxmake.sln
+++ b/xmake/plugins/project/vsxmake/vsproj/templates/sln/vsxmake.sln
@@ -28,7 +28,8 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
-#Import(TargetGroupConfig)# EndGlobalSection
+#Import(TargetGroupConfig)#
+#Import(SubGroupConfig)# EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {#solution_id#}
EndGlobalSection