[CMake] Re: Header files in Visual Studio projects?

Filipe Sousa filipe at ipb.pt
Fri Sep 22 06:10:37 EDT 2006


On Friday 22 September 2006 08:15, Anders Sundman wrote:
> Hi!
>
> We use CMake to generate Visual Studio projects and it works great.
> Everything builds ok, etc.
>
> However, the header files we use are not included in the projects file
> list. This doesn't effect the compilation, but from a development
> perspective it's quite annoying.
>
> Is there some way of adding the header files to Visual Studio (and other
> IDE:s) project files?
>
> Best Regards
> Anders Sundman

Add the header files to your source list or use source_group

fsousa at neptuno ~ $ cmake --help-command source_group
cmake version 2.5-20060920
  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)


-- 
Filipe Sousa

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/cmake/attachments/20060922/1ccff2dc/attachment.pgp


More information about the CMake mailing list