diff options
Diffstat (limited to 'Source/cmGlobalVisualStudio10Generator.cxx')
-rw-r--r-- | Source/cmGlobalVisualStudio10Generator.cxx | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index 4fa89d0..55374a4 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -784,11 +784,11 @@ bool cmGlobalVisualStudio10Generator::FindVCTargetsPath(cmMakefile* mf) if (this->GetSystemName() == "WindowsPhone") { cmXMLElement(epg, "ApplicationType").Content("Windows Phone"); cmXMLElement(epg, "ApplicationTypeRevision") - .Content(this->GetSystemVersion()); + .Content(this->GetApplicationTypeRevision()); } else if (this->GetSystemName() == "WindowsStore") { cmXMLElement(epg, "ApplicationType").Content("Windows Store"); cmXMLElement(epg, "ApplicationTypeRevision") - .Content(this->GetSystemVersion()); + .Content(this->GetApplicationTypeRevision()); } if (!this->WindowsTargetPlatformVersion.empty()) { cmXMLElement(epg, "WindowsTargetPlatformVersion") @@ -1112,6 +1112,15 @@ std::string cmGlobalVisualStudio10Generator::GetInstalledNsightTegraVersion() return version; } +std::string cmGlobalVisualStudio10Generator::GetApplicationTypeRevision() const +{ + // Return the first two '.'-separated components of the Windows version. + std::string::size_type end1 = this->SystemVersion.find('.'); + std::string::size_type end2 = + end1 == std::string::npos ? end1 : this->SystemVersion.find('.', end1 + 1); + return this->SystemVersion.substr(0, end2); +} + static std::string cmLoadFlagTableString(Json::Value entry, const char* field) { if (entry.isMember(field)) { |