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>
This commit is contained in:
Gilles Khouzam
2015-09-30 13:22:43 -07:00
committed by Brad King
parent 5dfc4c5f50
commit 3f077996f5
9 changed files with 121 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION
----------------------------------------
Visual Studio Windows Target Platform Version.
When targeting Windows 10 and above Visual Studio 2015 and above support
specification of a target Windows version to select a corresponding SDK.
The :variable:`CMAKE_SYSTEM_VERSION` variable may be set to specify a
version. Otherwise CMake computes a default version based on the Windows
SDK versions available. The chosen Windows target version number is provided
in ``CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION``.