[CMake] Missing header files in Visual Studio project

Martin Apel martin.apel at simpack.de
Wed Jun 25 03:18:55 EDT 2008


Hi all,

I am using the CMake generator for Visual Studio 2005 to generate 
multiple projects. CMake generates one project file per library, which 
is fine. When looking at a generated project inside Visual Studio the
project tree contains "Header files" and "Source files". Strange is, 
that under "Header files" only generated headers are listed, not any 
other headers, which are part of the source code. The "source files" 
entry contains all source files for this library. I create the library 
by doing something like
ADD_LIBRARY(Base SHARED EXCLUDE_FROM_ALL ${LocalSrc} ${GenCppFiles} 
${GenHFiles})

Do I have to add the normal header files in ADD_LIBRARY as well, so 
Visual Studio will list them? I would have expected CMake to 
automatically generate the list from the dependencies. What might be of 
interest as well (though I don't think it makes any difference), is that 
I explicitly set the regular expression to use for includes to
  INCLUDE_REGULAR_EXPRESSION ("\\.h$")
mainly to eliminate boost header files from the dependencies.

CMake version is 2.6.0.

Any thoughts on this are appreciated.

Regards,

Martin


____________
Virus checked by G DATA AntiVirus
Version: AVKB 18.323 from 25.06.2008




More information about the CMake mailing list