summaryrefslogtreecommitdiffstats
path: root/Modules
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 /Modules
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 'Modules')
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake3
-rw-r--r--Modules/CompilerId/VS-10.vcxproj.in1
2 files changed, 4 insertions, 0 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index df6daf3..81c2509 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -209,6 +209,9 @@ Id flags: ${testflags}
else()
set(id_system_version "")
endif()
+ if(CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION)
+ set(id_WindowsTargetPlatformVersion "<WindowsTargetPlatformVersion>${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}</WindowsTargetPlatformVersion>")
+ endif()
if(id_platform STREQUAL ARM)
set(id_WindowsSDKDesktopARMSupport "<WindowsSDKDesktopARMSupport>true</WindowsSDKDesktopARMSupport>")
else()
diff --git a/Modules/CompilerId/VS-10.vcxproj.in b/Modules/CompilerId/VS-10.vcxproj.in
index a17d03d..2870a11 100644
--- a/Modules/CompilerId/VS-10.vcxproj.in
+++ b/Modules/CompilerId/VS-10.vcxproj.in
@@ -12,6 +12,7 @@
<Keyword>Win32Proj</Keyword>
@id_system@
@id_system_version@
+ @id_WindowsTargetPlatformVersion@
@id_WindowsSDKDesktopARMSupport@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />