[CMake] Filter in VisualStudio projects
Eric Noulard
eric.noulard at gmail.com
Sun Jan 13 16:40:24 EST 2008
2008/1/13, Anders Backman <andersb at cs.umu.se>:
> Hi all.
>
> Is there a way to create/specify Filter (directories) in the VisualStudio
> projects?
>
> I would like to create a structure for the Source/Include
> (filters/Directories) in the VisualStudio project for clarity.
Does SOURCE_GROUP helps you:
cmake version 2.4-patch 7
SOURCE_GROUP
Define a grouping for sources in the makefile.
SOURCE_GROUP(name [REGULAR_EXPRESSION regex] [FILES src1 src2 ...])
Defines a group into which sources will be placed in project files.
This is mainly used to setup file tabs in Visual Studio. Any file
whose name is listed or matches the regular expression will be placed
in this group. If a file matches multiple groups, the LAST group that
explicitly lists the file will be favored, if any. If no group
explicitly lists the file, the LAST group whose regular expression
matches the file will be favored.
The name of the group may contain backslashes to specify subgroups:
SOURCE_GROUP(outer\\inner ...)
For backwards compatibility, this command is also supports the format:
SOURCE_GROUP(name regex)
--
Erk
More information about the CMake
mailing list