[CMake] Problems building a shared library

Tyler Roscoe tyler at cryptio.net
Thu May 27 15:56:13 EDT 2010


On Thu, May 27, 2010 at 09:51:19PM +0200, Michael Hertling wrote:
> >   add_library ( <name> STATIC ${SOURCES} ${HEADERS} )
> 
> In general, there's no need to specify headers in ADD_LIBRARY() or
> ADD_EXECUTABLE(). Usually, this does no harm, but dependencies of
> source files on headers are figured out by CMake automatically.
> An exception would be if the HEADERS trigger further actions.

If you have IDE users (VS specifically), you will want to include the
headers in your add_* calls so that the IDE can display those headers in
the fashion that your VS users are accustomed to.

tyler


More information about the CMake mailing list