1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-14 19:08:07 +08:00

VS: Add documentation for VS_SETTINGS and VS_SOURCE_SETTINGS_<tool>.

This commit is contained in:
Matt Davies
2020-03-27 15:40:43 +00:00
committed by Brad King
parent 2ca1102f83
commit 0723e04f7a
4 changed files with 49 additions and 0 deletions

View File

@@ -377,6 +377,7 @@ Properties on Targets
/prop_tgt/VS_SCC_PROVIDER
/prop_tgt/VS_SDK_REFERENCES
/prop_tgt/VS_SOLUTION_DEPLOY
/prop_tgt/VS_SOURCE_SETTINGS_tool
/prop_tgt/VS_USER_PROPS
/prop_tgt/VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION
/prop_tgt/VS_WINRT_COMPONENT
@@ -486,6 +487,7 @@ Properties on Source Files
/prop_sf/VS_DEPLOYMENT_LOCATION
/prop_sf/VS_INCLUDE_IN_VSIX
/prop_sf/VS_RESOURCE_GENERATOR
/prop_sf/VS_SETTINGS
/prop_sf/VS_SHADER_DISABLE_OPTIMIZATIONS
/prop_sf/VS_SHADER_ENABLE_DEBUG
/prop_sf/VS_SHADER_ENTRYPOINT

View File

@@ -0,0 +1,18 @@
VS_SETTINGS
-----------
Set any item metadata on a non-built file.
Takes a list of ``Key=Value`` pairs. Tells the Visual Studio generator to set
``Key`` to ``Value`` as item metadata on the file.
For example:
.. code-block:: cmake
set_property(SOURCE file.hlsl PROPERTY VS_SETTINGS "Key=Value" "Key2=Value2")
will set ``Key`` to ``Value`` and ``Key2`` to ``Value2`` on the
``file.hlsl`` item as metadata.
Generator expressions are supported.

View File

@@ -0,0 +1,19 @@
VS_SOURCE_SETTINGS_<tool>
-------------------------
Set any item metadata on all non-built files that use <tool>.
Takes a list of ``Key=Value`` pairs. Tells the Visual Studio generator
to set ``Key`` to ``Value`` as item metadata on all non-built files
that use ``<tool>``.
For example:
.. code-block:: cmake
set_property(TARGET main PROPERTY VS_SOURCE_SETTINGS_FXCompile "Key=Value" "Key2=Value2")
will set ``Key`` to ``Value`` and ``Key2`` to ``Value2`` for all
non-built files that use ``FXCompile``.
Generator expressions are supported.

View File

@@ -0,0 +1,10 @@
vs-non-built-file-item-metadata
-------------------------------
* The :prop_tgt:`VS_SOURCE_SETTINGS_<tool>` target property was added
to tell :ref:`Visual Studio Generators` for VS 2010 and above to add
metadata to non-built source files using ``<tool>``.
* The :prop_sf:`VS_SETTINGS` source file property was added to tell
:ref:`Visual Studio Generators` for VS 2010 and above to add
metadata to a non-built source file.