VS_SETTINGS
Added in version 3.18.
Add arbitrary MSBuild item metadata to a file.
This property accepts a list of Key=Value pairs. The Visual Studio generator will add these key-value pairs as item metadata to the file. Generator expressions are supported.
For example:
set_property(SOURCE file.hlsl PROPERTY VS_SETTINGS "Key=Value" "Key2=Value2")
will set the file.hlsl item metadata as follows:
<FXCompile Include="source_path\file.hlsl"> <Key>Value</Key> <Key2>Value2</Key2> </FXCompile>
Together with VS_TOOL_OVERRIDE, this property can be used to configure items for custom MSBuild tasks.
Adding the metadata ExcludedFromBuild=true will exclude the file from the build.
Changed in version 3.22: This property is honored for all source file types. Previously, it only worked for source types unknown to CMake.
© 2000–2026 Kitware, Inc. and Contributors
Licensed under the BSD 3-clause License.
https://cmake.org/cmake/help/latest/prop_sf/VS_SETTINGS.html