summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
diff options
context:
space:
mode:
authorGilles Khouzam <gillesk@microsoft.com>2015-09-30 20:22:43 (GMT)
committerBrad King <brad.king@kitware.com>2015-10-02 13:53:25 (GMT)
commit3f077996f58ca905125fc2387614b24c68c6f09e (patch)
tree49285eec1c99028594184c8dec34d97e678de25c /Source/cmVisualStudio10TargetGenerator.cxx
parent5dfc4c5f50f3198186320320cfed699872e5ece0 (diff)
downloadCMake-3f077996f58ca905125fc2387614b24c68c6f09e.zip
CMake-3f077996f58ca905125fc2387614b24c68c6f09e.tar.gz
CMake-3f077996f58ca905125fc2387614b24c68c6f09e.tar.bz2
VS: Add support for selecting the Windows 10 SDK (#15670)
Teach the VS 2015 generator to produce a WindowsTargetPlatformVersion value. Use the CMAKE_SYSTEM_VERSION to specify the version and if not set choose a default based on available SDKs. Activate this behavior when targeting Windows 10. Co-Author: Brad King <brad.king@kitware.com>
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 6c71313..91f2476 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -3006,6 +3006,8 @@ IsXamlSource(const std::string& sourceFile)
void cmVisualStudio10TargetGenerator::WriteApplicationTypeSettings()
{
+ cmGlobalVisualStudio10Generator* gg =
+ static_cast<cmGlobalVisualStudio10Generator*>(this->GlobalGenerator);
bool isAppContainer = false;
bool const isWindowsPhone = this->GlobalGenerator->TargetsWindowsPhone();
bool const isWindowsStore = this->GlobalGenerator->TargetsWindowsStore();
@@ -3062,6 +3064,14 @@ void cmVisualStudio10TargetGenerator::WriteApplicationTypeSettings()
this->WriteString("<WindowsSDKDesktopARMSupport>true"
"</WindowsSDKDesktopARMSupport>\n", 2);
}
+ std::string const& targetPlatformVersion =
+ gg->GetWindowsTargetPlatformVersion();
+ if (!targetPlatformVersion.empty())
+ {
+ this->WriteString("<WindowsTargetPlatformVersion>", 2);
+ (*this->BuildFileStream) << cmVS10EscapeXML(targetPlatformVersion) <<
+ "</WindowsTargetPlatformVersion>\n";
+ }
}
void cmVisualStudio10TargetGenerator::VerifyNecessaryFiles()