[CMake] target_link_libraries chain dynamic->static

Anton Sibilev anton.sibilev at gmail.com
Thu May 17 09:07:31 EDT 2012


Hello! I use 2.8.8 and my build chais is following:

I have 3 static libs  - A.a, B.a, C.a.
I'm creating new D.so (add_library .. SHARED .. ) with limited set on
functions from static libs (linking -lA -lB -lC to resolve functions).
Then I'm creating application, wich use D.so as main library. I'm linking
it with target_link_libraries(target D.so).

But finally, my link cmdline is following: -o application -lD -lA -lB -C.
But I want to link only one shared lib - D.so!
As I understand this is results of caching libs. How I can resolve this?

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120517/6a442217/attachment.htm>


More information about the CMake mailing list