diff options
author | Brad King <brad.king@kitware.com> | 2023-04-06 13:13:24 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2023-04-06 13:13:31 (GMT) |
commit | fbdb509efe21a02f075536eaf7fde0594e9419ef (patch) | |
tree | 254d5c3b7f4692126206ed2e0383fa18e579075f /Help/variable/CMAKE_GENERATOR_PLATFORM.rst | |
parent | 703f87f32f067ab2122571e652861b43dd86fb4c (diff) | |
parent | 8ecb6459345c550b77d8f689ed397137f2855fca (diff) | |
download | CMake-fbdb509efe21a02f075536eaf7fde0594e9419ef.zip CMake-fbdb509efe21a02f075536eaf7fde0594e9419ef.tar.gz CMake-fbdb509efe21a02f075536eaf7fde0594e9419ef.tar.bz2 |
Merge topic 'vs-sdk-selection'
8ecb645934 VS: Select Windows SDK matching WindowsSDKVersion env var
f90c8ab54e VS: Select latest available Windows SDK version by default
b512c53d43 VS: Add support for setting WindowsTargetPlatformVersion to 10.0
2f3d945f83 VS: Add CMAKE_GENERATOR_PLATFORM field to control Windows SDK selection
f0a67b6291 VS: Parse comma-separated fields from CMAKE_GENERATOR_PLATFORM
e259063b0a VS: Defer Windows SDK selection until CMAKE_GENERATOR_PLATFORM is known
8499374c6a VS: Simplify logic to require SDK for Windows Store
1c8d4b4bf1 Tests: Teach RunCMake_TEST_FILTER to account for test variant description
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8389
Diffstat (limited to 'Help/variable/CMAKE_GENERATOR_PLATFORM.rst')
-rw-r--r-- | Help/variable/CMAKE_GENERATOR_PLATFORM.rst | 42 |
1 files changed, 40 insertions, 2 deletions
diff --git a/Help/variable/CMAKE_GENERATOR_PLATFORM.rst b/Help/variable/CMAKE_GENERATOR_PLATFORM.rst index acb7b2e..416ff60 100644 --- a/Help/variable/CMAKE_GENERATOR_PLATFORM.rst +++ b/Help/variable/CMAKE_GENERATOR_PLATFORM.rst @@ -26,8 +26,46 @@ Platform specification is supported only on specific generators: See native build system documentation for allowed platform names. +.. _`Visual Studio Platform Selection`: + Visual Studio Platform Selection ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -On :ref:`Visual Studio Generators` the selected platform name -is provided in the :variable:`CMAKE_VS_PLATFORM_NAME` variable. +The :ref:`Visual Studio Generators` support platform specification +using one of these forms: + +* ``platform`` +* ``platform[,key=value]*`` +* ``key=value[,key=value]*`` + +The ``platform`` specifies the target platform (VS target architecture), +such as ``x64``, ``ARM64``, or ``Win32``. The selected platform +name is provided in the :variable:`CMAKE_VS_PLATFORM_NAME` variable. + +The ``key=value`` pairs form a comma-separated list of options to +specify generator-specific details of the platform selection. +Supported pairs are: + +``version=<version>`` + .. versionadded:: 3.27 + + Specify the Windows SDK version to use. This is supported by VS 2015 and + above when targeting Windows 10.0+ or Windows Store. CMake will set the + :variable:`CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION` variable to the + selected SDK version. + + The ``<version>`` may be one of: + + ``10.0`` + Specify that any 10.0 SDK version may be used, and let Visual Studio + pick one. This is supported by VS 2019 and above. + + ``10.0.<build>.<increment>`` + Specify the exact 4-component SDK version, e.g., ``10.0.19041.0``. + The specified version of the SDK must be installed. It may not exceed + the value of :variable:`CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION_MAXIMUM`, + if that variable is set. + + If the ``version`` field is not specified, CMake selects a version as + described in the :variable:`CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION` + variable documentation. |