[CMake] Missing header files in Visual Studio project

Eric Noulard eric.noulard at gmail.com
Wed Jun 25 04:11:28 EDT 2008


2008/6/25 Martin Apel <martin.apel at simpack.de>:
> 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?

Yes you do have to do that.
Header file would appear if they are listed inside ADD_LIBRARY
or ADD_EXECUTABLE.

-- 
Erk


More information about the CMake mailing list