[CMake] static library linking
Brad King
brad.king at kitware.com
Sun Jun 15 19:39:14 EDT 2008
Steven Van Ingelgem wrote:
> Another issue I just noticed... If you link to an "add_library" or so,
> it will add all the target linked libraries of the original
> "add_library", which is rather incorrect imho because I don't want to
> link every library to a 100M static library, that is only compiled in in
> 1 shared library...
>
> Is there somehow I can turn this off?
http://www.cmake.org/HTML/cmake-2.6.html#prop_tgt:LINK_INTERFACE_LIBRARIES
add_library(mySharedLib mysharedlib.c)
target_link_libraries(mySharedLib myHugeStaticLib)
set_property(TARGET mySharedLib PROPERTY LINK_INTERFACE_LIBRARIES "")
-Brad
More information about the CMake
mailing list