[CMake] target_link_libraries doubt

Vikas Kumar vikasnkumar at users.sourceforge.net
Wed Jun 14 14:35:32 EDT 2006


Hi
I have a library that links to other shared libraries. For example I
am trying to build libFoo.so , which links to a shared library
libBar.so.
How do i link in libBar.so statically instead ?
is there a way to do that like by saying "-static "  just before libBar.so
This way I will have to worry about distributing one library instead of two.
Here is a view of my cmake file.

ADD_LIBRARY(Foo Foo.cpp)
TARGET_LINK_LIBRARIES(Foo Bar)

Any help will be appreciated.

Thanks
Vikas


More information about the CMake mailing list