Skip to content

Commit ebb4980

Browse files
bradkingkwrobot
authored andcommitted
Merge topic 'vs-slnx' into release-4.2
06178da VS: Add include_external_msproject detection of `.wapproj` type b9ce07b VS: Add SLNX project types Acked-by: Kitware Robot <[email protected]> Merge-request: !11428
2 parents be29169 + 06178da commit ebb4980

28 files changed

+81
-68
lines changed

Source/cmGlobalVisualStudioGenerator.cxx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -798,6 +798,9 @@ cm::string_view cmGlobalVisualStudioGenerator::ExternalProjectTypeId(
798798
if (extension == ".dbproj"_s) {
799799
return Solution::Project::TypeIdDatabase;
800800
}
801+
if (extension == ".wapproj"_s) {
802+
return Solution::Project::TypeIdWinAppPkg;
803+
}
801804
if (extension == ".wixproj"_s) {
802805
return Solution::Project::TypeIdWiX;
803806
}

Source/cmVSSolution.cxx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ cm::string_view const Solution::Project::TypeIdVDProj =
3333
"54435603-DBB4-11D2-8724-00A0C9A8B90C"_s;
3434
cm::string_view const Solution::Project::TypeIdVisualBasic =
3535
"F184B08F-C81C-45F6-A57F-5ABD9991F28F"_s;
36+
cm::string_view const Solution::Project::TypeIdWinAppPkg =
37+
"C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5"_s;
3638
cm::string_view const Solution::Project::TypeIdWiX =
3739
"930C7802-8A8C-48F9-8165-68863BCCD9DD"_s;
3840

@@ -311,6 +313,7 @@ void WriteSlnxProject(cmXMLElement& xmlParent, Solution const& solution,
311313
{
312314
cmXMLElement xmlProject(xmlParent, "Project");
313315
xmlProject.Attribute("Path", project.Path);
316+
xmlProject.Attribute("Type", cmSystemTools::LowerCase(project.TypeId));
314317
xmlProject.Attribute("Id", cmSystemTools::LowerCase(project.Id));
315318
if (project.Name == solution.StartupProject) {
316319
xmlProject.Attribute("DefaultStartup", "true");

Source/cmVSSolution.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ struct Solution final
7878
static cm::string_view const TypeIdPython;
7979
static cm::string_view const TypeIdVDProj;
8080
static cm::string_view const TypeIdVisualBasic;
81+
static cm::string_view const TypeIdWinAppPkg;
8182
static cm::string_view const TypeIdWiX;
8283
};
8384

Tests/RunCMake/VSSolution/AddPackageToDefault-check-slnx.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ RunCMake_check_slnx("${RunCMake_TEST_BINARY_DIR}/AddPackageToDefault.slnx" [[
88
<BuildType Name="RelWithDebInfo"/>
99
<Platform Name="[^"]+"/>
1010
</Configurations>
11-
<Project Path="ALL_BUILD\.vcxproj" Id="[0-9a-f-]+" DefaultStartup="true">
11+
<Project Path="ALL_BUILD\.vcxproj" Type="8bc9ceb8-8b4a-11d0-8d11-00a0c91bc942" Id="[0-9a-f-]+" DefaultStartup="true">
1212
<BuildDependency Project="ZERO_CHECK\.vcxproj"/>
1313
</Project>
14-
<Project Path="PACKAGE.vcxproj" Id="[0-9a-f-]+">
14+
<Project Path="PACKAGE.vcxproj" Type="8bc9ceb8-8b4a-11d0-8d11-00a0c91bc942" Id="[0-9a-f-]+">
1515
<BuildDependency Project="ALL_BUILD.vcxproj"/>
1616
<BuildDependency Project="ZERO_CHECK.vcxproj"/>
1717
</Project>
18-
<Project Path="ZERO_CHECK\.vcxproj" Id="[0-9a-f-]+"/>
18+
<Project Path="ZERO_CHECK\.vcxproj" Type="8bc9ceb8-8b4a-11d0-8d11-00a0c91bc942" Id="[0-9a-f-]+"/>
1919
</Solution>$]])

Tests/RunCMake/VSSolution/CMP0143-NEW-check-slnx.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,21 @@ RunCMake_check_slnx("${RunCMake_TEST_BINARY_DIR}/CMP0143-NEW.slnx" [[
88
<BuildType Name="RelWithDebInfo"/>
99
<Platform Name="[^"]+"/>
1010
</Configurations>
11-
<Project Path="TestStartup\.vcxproj" Id="[0-9a-f-]+">
11+
<Project Path="TestStartup\.vcxproj" Type="8bc9ceb8-8b4a-11d0-8d11-00a0c91bc942" Id="[0-9a-f-]+">
1212
<BuildDependency Project="ZERO_CHECK.vcxproj"/>
1313
<Build Solution="Debug\|\*" Project="false"/>
1414
<Build Solution="Release\|\*" Project="false"/>
1515
<Build Solution="MinSizeRel\|\*" Project="false"/>
1616
<Build Solution="RelWithDebInfo\|\*" Project="false"/>
1717
</Project>
1818
<Folder Name="/CMakePredefinedTargets/">
19-
<Project Path="ALL_BUILD.vcxproj" Id="[0-9a-f-]+" DefaultStartup="true">
19+
<Project Path="ALL_BUILD.vcxproj" Type="8bc9ceb8-8b4a-11d0-8d11-00a0c91bc942" Id="[0-9a-f-]+" DefaultStartup="true">
2020
<BuildDependency Project="ZERO_CHECK.vcxproj"/>
2121
<Build Solution="Debug\|\*" Project="false"/>
2222
<Build Solution="Release\|\*" Project="false"/>
2323
<Build Solution="MinSizeRel\|\*" Project="false"/>
2424
<Build Solution="RelWithDebInfo\|\*" Project="false"/>
2525
</Project>
26-
<Project Path="ZERO_CHECK.vcxproj" Id="[0-9a-f-]+"/>
26+
<Project Path="ZERO_CHECK.vcxproj" Type="8bc9ceb8-8b4a-11d0-8d11-00a0c91bc942" Id="[0-9a-f-]+"/>
2727
</Folder>
2828
</Solution>$]])

Tests/RunCMake/VSSolution/CMP0143-OLD-check-slnx.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@ RunCMake_check_slnx("${RunCMake_TEST_BINARY_DIR}/CMP0143-OLD.slnx" [[
88
<BuildType Name="RelWithDebInfo"/>
99
<Platform Name="[^"]+"/>
1010
</Configurations>
11-
<Project Path="ALL_BUILD\.vcxproj" Id="[0-9a-f-]+" DefaultStartup="true">
11+
<Project Path="ALL_BUILD\.vcxproj" Type="8bc9ceb8-8b4a-11d0-8d11-00a0c91bc942" Id="[0-9a-f-]+" DefaultStartup="true">
1212
<BuildDependency Project="ZERO_CHECK\.vcxproj"/>
1313
<Build Solution="Debug\|\*" Project="false"/>
1414
<Build Solution="Release\|\*" Project="false"/>
1515
<Build Solution="MinSizeRel\|\*" Project="false"/>
1616
<Build Solution="RelWithDebInfo\|\*" Project="false"/>
1717
</Project>
18-
<Project Path="TestStartup.vcxproj" Id="[0-9a-f-]+">
18+
<Project Path="TestStartup.vcxproj" Type="8bc9ceb8-8b4a-11d0-8d11-00a0c91bc942" Id="[0-9a-f-]+">
1919
<BuildDependency Project="ZERO_CHECK.vcxproj"/>
2020
<Build Solution="Debug\|\*" Project="false"/>
2121
<Build Solution="Release\|\*" Project="false"/>
2222
<Build Solution="MinSizeRel\|\*" Project="false"/>
2323
<Build Solution="RelWithDebInfo\|\*" Project="false"/>
2424
</Project>
25-
<Project Path="ZERO_CHECK\.vcxproj" Id="[0-9a-f-]+"/>
25+
<Project Path="ZERO_CHECK\.vcxproj" Type="8bc9ceb8-8b4a-11d0-8d11-00a0c91bc942" Id="[0-9a-f-]+"/>
2626
</Solution>$]])

Tests/RunCMake/VSSolution/CMP0143-WARN-check-slnx.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@ RunCMake_check_slnx("${RunCMake_TEST_BINARY_DIR}/CMP0143-WARN.slnx" [[
88
<BuildType Name="RelWithDebInfo"/>
99
<Platform Name="[^"]+"/>
1010
</Configurations>
11-
<Project Path="ALL_BUILD\.vcxproj" Id="[0-9a-f-]+" DefaultStartup="true">
11+
<Project Path="ALL_BUILD\.vcxproj" Type="8bc9ceb8-8b4a-11d0-8d11-00a0c91bc942" Id="[0-9a-f-]+" DefaultStartup="true">
1212
<BuildDependency Project="ZERO_CHECK\.vcxproj"/>
1313
<Build Solution="Debug\|\*" Project="false"/>
1414
<Build Solution="Release\|\*" Project="false"/>
1515
<Build Solution="MinSizeRel\|\*" Project="false"/>
1616
<Build Solution="RelWithDebInfo\|\*" Project="false"/>
1717
</Project>
18-
<Project Path="TestStartup.vcxproj" Id="[0-9a-f-]+">
18+
<Project Path="TestStartup.vcxproj" Type="8bc9ceb8-8b4a-11d0-8d11-00a0c91bc942" Id="[0-9a-f-]+">
1919
<BuildDependency Project="ZERO_CHECK.vcxproj"/>
2020
<Build Solution="Debug\|\*" Project="false"/>
2121
<Build Solution="Release\|\*" Project="false"/>
2222
<Build Solution="MinSizeRel\|\*" Project="false"/>
2323
<Build Solution="RelWithDebInfo\|\*" Project="false"/>
2424
</Project>
25-
<Project Path="ZERO_CHECK\.vcxproj" Id="[0-9a-f-]+"/>
25+
<Project Path="ZERO_CHECK\.vcxproj" Type="8bc9ceb8-8b4a-11d0-8d11-00a0c91bc942" Id="[0-9a-f-]+"/>
2626
</Solution>$]])

Tests/RunCMake/VSSolution/DeployEnabled-check-slnx.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ RunCMake_check_slnx("${RunCMake_TEST_BINARY_DIR}/DeployEnabled.slnx" [[
88
<BuildType Name="RelWithDebInfo"/>
99
<Platform Name="[^"]+"/>
1010
</Configurations>
11-
<Project Path="ALL_BUILD\.vcxproj" Id="[0-9a-f-]+" DefaultStartup="true">
11+
<Project Path="ALL_BUILD\.vcxproj" Type="8bc9ceb8-8b4a-11d0-8d11-00a0c91bc942" Id="[0-9a-f-]+" DefaultStartup="true">
1212
<BuildDependency Project="ZERO_CHECK\.vcxproj"/>
1313
<BuildDependency Project="foo\.vcxproj"/>
1414
<Build Solution="Debug\|\*" Project="false"/>
1515
<Build Solution="Release\|\*" Project="false"/>
1616
<Build Solution="MinSizeRel\|\*" Project="false"/>
1717
<Build Solution="RelWithDebInfo\|\*" Project="false"/>
1818
</Project>
19-
<Project Path="ZERO_CHECK\.vcxproj" Id="[0-9a-f-]+"/>
20-
<Project Path="foo\.vcxproj" Id="[0-9a-f-]+">
19+
<Project Path="ZERO_CHECK\.vcxproj" Type="8bc9ceb8-8b4a-11d0-8d11-00a0c91bc942" Id="[0-9a-f-]+"/>
20+
<Project Path="foo\.vcxproj" Type="8bc9ceb8-8b4a-11d0-8d11-00a0c91bc942" Id="[0-9a-f-]+">
2121
<BuildDependency Project="ZERO_CHECK\.vcxproj"/>
2222
<Deploy Solution="Debug\|\*"/>
2323
<Deploy Solution="MinSizeRel\|\*"/>

Tests/RunCMake/VSSolution/MorePost-check-slnx.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ RunCMake_check_slnx("${RunCMake_TEST_BINARY_DIR}/MorePost.slnx" [[
88
<BuildType Name="RelWithDebInfo"/>
99
<Platform Name="[^"]+"/>
1010
</Configurations>
11-
<Project Path="ALL_BUILD\.vcxproj" Id="[0-9a-f-]+" DefaultStartup="true">
11+
<Project Path="ALL_BUILD\.vcxproj" Type="8bc9ceb8-8b4a-11d0-8d11-00a0c91bc942" Id="[0-9a-f-]+" DefaultStartup="true">
1212
<BuildDependency Project="ZERO_CHECK\.vcxproj"/>
1313
<Build Solution="Debug\|\*" Project="false"/>
1414
<Build Solution="Release\|\*" Project="false"/>
1515
<Build Solution="MinSizeRel\|\*" Project="false"/>
1616
<Build Solution="RelWithDebInfo\|\*" Project="false"/>
1717
</Project>
18-
<Project Path="ZERO_CHECK\.vcxproj" Id="[0-9a-f-]+"/>
18+
<Project Path="ZERO_CHECK\.vcxproj" Type="8bc9ceb8-8b4a-11d0-8d11-00a0c91bc942" Id="[0-9a-f-]+"/>
1919
<Properties Name="TestSec2" Scope="PostLoad">
2020
<Properties Name="Key1" Value="Value1"/>
2121
<Properties Name="Key2" Value="Value with spaces"/>

Tests/RunCMake/VSSolution/MorePre-check-slnx.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ RunCMake_check_slnx("${RunCMake_TEST_BINARY_DIR}/MorePre.slnx" [[
88
<BuildType Name="RelWithDebInfo"/>
99
<Platform Name="[^"]+"/>
1010
</Configurations>
11-
<Project Path="ALL_BUILD\.vcxproj" Id="[0-9a-f-]+" DefaultStartup="true">
11+
<Project Path="ALL_BUILD\.vcxproj" Type="8bc9ceb8-8b4a-11d0-8d11-00a0c91bc942" Id="[0-9a-f-]+" DefaultStartup="true">
1212
<BuildDependency Project="ZERO_CHECK\.vcxproj"/>
1313
<Build Solution="Debug\|\*" Project="false"/>
1414
<Build Solution="Release\|\*" Project="false"/>
1515
<Build Solution="MinSizeRel\|\*" Project="false"/>
1616
<Build Solution="RelWithDebInfo\|\*" Project="false"/>
1717
</Project>
18-
<Project Path="ZERO_CHECK\.vcxproj" Id="[0-9a-f-]+"/>
18+
<Project Path="ZERO_CHECK\.vcxproj" Type="8bc9ceb8-8b4a-11d0-8d11-00a0c91bc942" Id="[0-9a-f-]+"/>
1919
<Properties Name="TestSec1">
2020
<Properties Name="Key1" Value="Value1"/>
2121
<Properties Name="Key2" Value="Value with spaces"/>

0 commit comments

Comments
 (0)