[CMake] Header only targets, solution folders and shared settings?

Pascal Fleury fleury at users.sourceforge.net
Sun May 20 15:47:16 EDT 2007


On Sunday 20 May 2007 16:14:49 Kenny Erleben wrote:

> Our users use their IDE to get an overview of the header library, they
> do ``code-digging'' and use the class-browser to find their way to a
> tool etc.. For making this more easy we simply use a ``library'' project
> in vc80. In terms of CMake I want to write something like:
>
> FILE( GLOB_RECURSE OPENTISSUE_HEADER_FILES *.h )
> ADD_LIBRARY(OpenTissue ${OPENTISSUE_HEADER_FILES})

ADD_LIBRARY is for a *.lib or *.dll, or *.a/*.so on other platforms, and with 
only header files it does not know what to do. This is the semantics of this 
CMake command.

I don't get clearly either what you are trying to achieve. We typically have 
the whole project in CVS/SVN, then when checking it our, each user runs 
cmake. For VS users, they select a directory, and then within that directory 
you have project files and a solution file. From this, you can use the IDE 
for searching in the code, it will find the source/headers.

If you'd like to have the files grouped somewhere to make its clustering 
visible in the IDE, there is also the command SOURCE_GROUP that will make a 
virtual folder in your project, but it will not make a separate project 
though.

--pascal


More information about the CMake mailing list