Browse Source

VS: Add include_external_msproject detection of `.wapproj` type

It is a Windows Application Packaging Project.

Issue: #27392
Brad King 2 weeks ago
parent
commit
06178da668

+ 3 - 0
Source/cmGlobalVisualStudioGenerator.cxx

@@ -798,6 +798,9 @@ cm::string_view cmGlobalVisualStudioGenerator::ExternalProjectTypeId(
   if (extension == ".dbproj"_s) {
     return Solution::Project::TypeIdDatabase;
   }
+  if (extension == ".wapproj"_s) {
+    return Solution::Project::TypeIdWinAppPkg;
+  }
   if (extension == ".wixproj"_s) {
     return Solution::Project::TypeIdWiX;
   }

+ 2 - 0
Source/cmVSSolution.cxx

@@ -33,6 +33,8 @@ cm::string_view const Solution::Project::TypeIdVDProj =
   "54435603-DBB4-11D2-8724-00A0C9A8B90C"_s;
 cm::string_view const Solution::Project::TypeIdVisualBasic =
   "F184B08F-C81C-45F6-A57F-5ABD9991F28F"_s;
+cm::string_view const Solution::Project::TypeIdWinAppPkg =
+  "C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5"_s;
 cm::string_view const Solution::Project::TypeIdWiX =
   "930C7802-8A8C-48F9-8165-68863BCCD9DD"_s;
 

+ 1 - 0
Source/cmVSSolution.h

@@ -78,6 +78,7 @@ struct Solution final
     static cm::string_view const TypeIdPython;
     static cm::string_view const TypeIdVDProj;
     static cm::string_view const TypeIdVisualBasic;
+    static cm::string_view const TypeIdWinAppPkg;
     static cm::string_view const TypeIdWiX;
   };
 

+ 1 - 0
Tests/RunCMake/include_external_msproject/AutoType-check-sln.cmake

@@ -5,4 +5,5 @@ check_project(AutoType externalPy  "" "888888A0-9F3D-457C-B088-3A5042F75D52" ""
 check_project(AutoType externalVB  "" "F184B08F-C81C-45F6-A57F-5ABD9991F28F" "" "")
 check_project(AutoType externalVD  "" "54435603-DBB4-11D2-8724-00A0C9A8B90C" "" "")
 check_project(AutoType externalVF  "" "6989167D-11E4-40FE-8C1A-2192A86A7E90" "" "")
+check_project(AutoType externalWAP "" "C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5" "" "")
 check_project(AutoType externalWiX "" "930C7802-8A8C-48F9-8165-68863BCCD9DD" "" "")

+ 4 - 0
Tests/RunCMake/include_external_msproject/AutoType-check-slnx.cmake

@@ -17,6 +17,7 @@ RunCMake_check_slnx("${RunCMake_TEST_BINARY_DIR}/AutoType.slnx" [[
     <BuildDependency Project="external\.vbproj"/>
     <BuildDependency Project="external\.vdproj"/>
     <BuildDependency Project="external\.vfproj"/>
+    <BuildDependency Project="external\.wapproj"/>
     <BuildDependency Project="external\.wixproj"/>
     <Build Solution="Debug\|\*" Project="false"/>
     <Build Solution="Release\|\*" Project="false"/>
@@ -46,6 +47,9 @@ RunCMake_check_slnx("${RunCMake_TEST_BINARY_DIR}/AutoType.slnx" [[
   <Project Path="external\.vfproj" Type="6989167d-11e4-40fe-8c1a-2192a86a7e90" Id="[0-9a-f-]+">
     <BuildDependency Project="ZERO_CHECK.vcxproj"/>
   </Project>
+  <Project Path="external\.wapproj" Type="c7167f0d-bc9f-4e6e-afe1-012c56b48db5" Id="[0-9a-f-]+">
+    <BuildDependency Project="ZERO_CHECK.vcxproj"/>
+  </Project>
   <Project Path="external\.wixproj" Type="930c7802-8a8c-48f9-8165-68863bccd9dd" Id="[0-9a-f-]+">
     <BuildDependency Project="ZERO_CHECK.vcxproj"/>
   </Project>

+ 1 - 0
Tests/RunCMake/include_external_msproject/AutoType.cmake

@@ -5,4 +5,5 @@ include_external_msproject(externalPy  external.pyproj)
 include_external_msproject(externalVB  external.vbproj)
 include_external_msproject(externalVD  external.vdproj)
 include_external_msproject(externalVF  external.vfproj)
+include_external_msproject(externalWAP external.wapproj)
 include_external_msproject(externalWiX external.wixproj)