VS_SOLUTION_ITEMS

在版本 4.0 中添加。

指定包含在生成的 Visual Studio 解决方案中的解决方案级别项。

The Visual Studio Generators create a .sln file for each directory whose CMakeLists.txt file calls the project() command. Append paths to this property in the same directory as the top-level project() command call (e.g. in the top-level CMakeLists.txt file) to specify files included in the corresponding solution file.

If a file specified in VS_SOLUTION_ITEMS matches a source_group() command call, the affected solution level items are placed in a hierarchy of solution level folders according to the name specified in that command. Otherwise the items are placed in a default solution level directory named Solution Items. This name matches the default directory name used by Visual Studio when attempting to add solution level items at the root of the solution.