cmake/Help/variable/CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION.rst

41 lines
1.5 KiB
ReStructuredText
Raw Normal View History

2015-11-17 17:22:37 +01:00
CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION
----------------------------------------
2021-09-14 00:13:48 +02:00
.. versionadded:: 3.4
2015-11-17 17:22:37 +01:00
Visual Studio Windows Target Platform Version.
2023-07-02 19:51:09 +02:00
When targeting Windows 10 and above, :ref:`Visual Studio Generators` for
VS 2015 and above support specification of a Windows SDK version:
* If :variable:`CMAKE_GENERATOR_PLATFORM` specifies a ``version=`` field,
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.
.. versionchanged:: 3.27
This is disabled by policy :policy:`CMP0149`.
* Otherwise, CMake uses the latest Windows SDK version available.
The chosen Windows target version number is provided
2016-03-13 13:35:51 +01:00
in ``CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION``. If no Windows 10 SDK
is available this value will be empty.
2017-07-20 19:35:53 +02:00
One may set a ``CMAKE_WINDOWS_KITS_10_DIR`` *environment variable*
to an absolute path to tell CMake to look for Windows 10 SDKs in
a custom location. The specified directory is expected to contain
``Include/10.0.*`` directories.
2021-09-14 00:13:48 +02:00
See also :variable:`CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION_MAXIMUM`.