[CMake] Including object/archive/library in a static lib

Armand Filippi (Temp) Armand.Filippi at autodesk.com
Tue Sep 9 12:42:45 EDT 2008


Hi all,

I am trying to _include_ an externally built library B in a static lib A that I'm building with Cmake.

For MSVC, I would like it to end up in the Librarian>Additional Dependencies (and have its path in the Additional Library Directories). Also, this would add some /LIBPATH: and the library names at the end of the linker command.

For Linux ld, the equivalent result would be to have the B library appended to the linker command, with the -whole-archive parameter.

Apparently, using the Cmake command: target_link_libraries(<my lib A> <my lib B>) with Cmake 2.6.0 patch0 does not produce this result (nothing in the additional dependencies field in MSVC)

Is that supported by Cmake ?

Thanks a bunch,
Armand


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20080909/d8bcd7d4/attachment.htm>


More information about the CMake mailing list