VS: Add option to set VS_GLOBAL_* for all targets

Fixes: #18287
This commit is contained in:
Mikhail Korolev
2018-09-21 14:23:22 +03:00
committed by Brad King
parent 227b2be9d6
commit 22e670a306
4 changed files with 53 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
CMAKE_VS_GLOBALS
----------------
List of ``Key=Value`` records to be set per target as target properties
:prop_tgt:`VS_GLOBAL_<variable>` with ``variable=Key`` and value ``Value``.
For example:
.. code-block:: cmake
set(CMAKE_VS_GLOBALS
"DefaultLanguage=en-US"
"MinimumVisualStudioVersion=14.0"
)
will set properties ``VS_GLOBAL_DefaultLanguage`` to ``en-US`` and
``VS_GLOBAL_MinimumVisualStudioVersion`` to ``14.0`` for all targets
(except for ``INTERFACE`` libraries).
This variable is meant to be set by a
:variable:`toolchain file <CMAKE_TOOLCHAIN_FILE>`.