[CMake] How to link specific static libraries

Stephen Torri stephen.torri at gmail.com
Wed Jun 29 08:30:27 EDT 2011


Normally we use target_link_libraries to link against certain libraries. For
example:

target_link_libraries ( mytarget A B C )

Well when I am working on creating regressions tests for my library, called
mytarget, I would use the same CMake command to link against the
boost unit test framework library. What I curious to know is it possible to
set properties for a specific library, e.g. B in this scenario, to say that
the build should always link against a static library even if the shared
library is present?

So in this case A and C would be linked as shared but B would be linked as
static.

Stephen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110629/62bd36df/attachment.htm>


More information about the CMake mailing list