[CMake] How to use LINK_INTERFACE_LIBRARIES
Lucas Soltic
lucas.soltic at orange.fr
Sat May 24 12:15:34 EDT 2014
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
More information about the CMake
mailing list