The following is all on Linux (with gcc, gnu binutils, etc).
I'm trying to build libfred.so that uses code from libjoe.a, but I want
libfred.so to be complete, i.e. I don't want any program that I build
that links to libfred.so also need libjoe.a.
Then I want to build executable mike that is dynamically linked with
libfred.so . However, the link script for mike puts libjoe.a on the
command line.
add_library(joe STATIC joe.c joe_a.c)
add_library(fred SHARED fred.c fred_a.c)
target_link_libraries(fred joe)
add_executable(mike mike.c)
# mike only contains calls to functions in fred
target_link_libraries(mike fred)
The docs give me the impression that I should set the
INTERFACE_LINK_LIBRARIES property on moo to override the inherited
transitive dependencies, but setting it to "" has no effect. Same for
LINK_INTERFACE_LIBRARIES.
Any idea how to make this work?
Thanks,
B.
-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may
contain
confidential information. Any unauthorized review, use, disclosure or
distribution
is prohibited. If you are not the intended recipient, please contact the
sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake