[CMake] Adding dependencies for static libraries

Robert Bielik robert at xponaut.com
Tue Oct 16 11:53:46 EDT 2012


Titus von Boxberg skrev 2012-10-16 13:20:
> Actually, "target_link_libraries(C B)" puts B into the
> Additional Dependencies of the VC project generated for C.

Unfortunately that doesn't cut it. target_link_libraries adds the build dependency, but it does not list the lib files in "Additional Dependecies", which I think shuld be default behavior with static libraries (just as it does for a shared library).

I'll file a bug report for this. My whole aim is to be able to create a single static library file that contains everything it needs, so that an executable linking statically won't have to bother. Using a shared library is an option, but we'd like to be able to offer customers both dynamic and static linking options.

Regards
/Rob


More information about the CMake mailing list