diff options
author | Brad King <brad.king@kitware.com> | 2023-04-03 15:24:55 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-04-05 16:06:22 (GMT) |
commit | 8ecb6459345c550b77d8f689ed397137f2855fca (patch) | |
tree | 2b40b1436ee7da0ead3fbc44fc5349bad53d8f59 /Help/variable | |
parent | f90c8ab54ebd751600f525a3e548841e6aa16049 (diff) | |
download | CMake-8ecb6459345c550b77d8f689ed397137f2855fca.zip CMake-8ecb6459345c550b77d8f689ed397137f2855fca.tar.gz CMake-8ecb6459345c550b77d8f689ed397137f2855fca.tar.bz2 |
VS: Select Windows SDK matching WindowsSDKVersion env var
In an environment established by `vcvarsall.bat` or similar, this
environment variable may be set to select a Windows SDK version.
If the VS generator is used in such an environment, use that SDK.
This is similar to how `CMAKE_GENERATOR_INSTANCE` defaults using
a `VS##0COMNTOOLS` environment variable.
Fixes: #17992
Diffstat (limited to 'Help/variable')
-rw-r--r-- | Help/variable/CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION.rst | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Help/variable/CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION.rst b/Help/variable/CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION.rst index d69bb7b..2c14d39 100644 --- a/Help/variable/CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION.rst +++ b/Help/variable/CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION.rst @@ -12,6 +12,14 @@ VS 2015 and above support specification of a Windows SDK version: as documented by :ref:`Visual Studio Platform Selection`, that SDK version is selected. +* Otherwise, if the ``WindowsSDKVersion`` environment variable + is set to an available SDK version, that version is selected. + This is intended for use in environments established by ``vcvarsall.bat`` + or similar scripts. + + .. versionadded:: 3.27 + This is enabled by policy :policy:`CMP0149`. + * Otherwise, if :variable:`CMAKE_SYSTEM_VERSION` is set to an available SDK version, that version is selected. |