Commit 9c07cefe authored by Brad King's avatar Brad King

VS: Fix ApplicationTypeRevision in builtin check projects

Do not use the entire `CMAKE_SYSTEM_VERSION`, but rather the first two
components only.

Fixes: #19275
parent 639e14de
...@@ -276,8 +276,8 @@ Id flags: ${testflags} ${CMAKE_${lang}_COMPILER_ID_FLAGS_ALWAYS} ...@@ -276,8 +276,8 @@ Id flags: ${testflags} ${CMAKE_${lang}_COMPILER_ID_FLAGS_ALWAYS}
else() else()
set(id_system "") set(id_system "")
endif() endif()
if(id_system AND CMAKE_SYSTEM_VERSION) if(id_system AND CMAKE_SYSTEM_VERSION MATCHES "^([0-9]+\\.[0-9]+)")
set(id_system_version "<ApplicationTypeRevision>${CMAKE_SYSTEM_VERSION}</ApplicationTypeRevision>") set(id_system_version "<ApplicationTypeRevision>${CMAKE_MATCH_1}</ApplicationTypeRevision>")
else() else()
set(id_system_version "") set(id_system_version "")
endif() endif()
......
...@@ -784,11 +784,11 @@ bool cmGlobalVisualStudio10Generator::FindVCTargetsPath(cmMakefile* mf) ...@@ -784,11 +784,11 @@ bool cmGlobalVisualStudio10Generator::FindVCTargetsPath(cmMakefile* mf)
if (this->GetSystemName() == "WindowsPhone") { if (this->GetSystemName() == "WindowsPhone") {
cmXMLElement(epg, "ApplicationType").Content("Windows Phone"); cmXMLElement(epg, "ApplicationType").Content("Windows Phone");
cmXMLElement(epg, "ApplicationTypeRevision") cmXMLElement(epg, "ApplicationTypeRevision")
.Content(this->GetSystemVersion()); .Content(this->GetApplicationTypeRevision());
} else if (this->GetSystemName() == "WindowsStore") { } else if (this->GetSystemName() == "WindowsStore") {
cmXMLElement(epg, "ApplicationType").Content("Windows Store"); cmXMLElement(epg, "ApplicationType").Content("Windows Store");
cmXMLElement(epg, "ApplicationTypeRevision") cmXMLElement(epg, "ApplicationTypeRevision")
.Content(this->GetSystemVersion()); .Content(this->GetApplicationTypeRevision());
} }
if (!this->WindowsTargetPlatformVersion.empty()) { if (!this->WindowsTargetPlatformVersion.empty()) {
cmXMLElement(epg, "WindowsTargetPlatformVersion") cmXMLElement(epg, "WindowsTargetPlatformVersion")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment