On 24.05.2014 18:15, Lucas Soltic wrote:
Hello!

I'm having a hard time at properly using LINK_INTERFACE_LIBRARIES.
 From what I understood, setting this property empty for a target avoids 
transitive dependencies linking.

But whatever I try, it doesn't work.
I have created a lib A linked against lib B.
I'm also creating an exe linked against lib A. But I really don't want it to be 
linked against lib B.

Till now I've tried
target_link_libraries(myexe A)
target_link_libraries(myexe LINK_INTERFACE_LIBRARIES "")
and
target_link_libraries(myexe A)
set_target_properties(myexe PROPERTIES LINK_INTERFACE_LIBRARIES "")
and
target_link_libraries(myexe LINK_INTERFACE_LIBRARIES A)

But in all these cases the exe gets linked against B :( (which causes loading 
issues due to RPATH stuff)
Does someone know how to use this property? (if it's the right one?)

Kind regards,
Lucas

target_link_libraries(A PRIVATE B) # A links to B but B is not added to the interface of A
target_link_libraries(myexe A) # myexe links to A without B

Nils
--

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://www.cmake.org/mailman/listinfo/cmake

Reply via email to