[cmake-developers] RPATH info missing when using a genex (Was: Recommended use of imported targets...)

Brad King brad.king at kitware.com
Thu Feb 28 11:32:54 EST 2013


On 02/28/2013 11:21 AM, Stephen Kelly wrote:
>  target_link_libraries(foo $<TARGET_NAME:Qt4::QtCore>)
> 
> gives 
> 
>  /usr/lib/icecc/bin/c++  -fPIC    -shared -Wl,-soname,libfoo.so -o libfoo.so 
> CMakeFiles/foo.dir/empty.cpp.o 
> /home/stephen/dev/prefix/qt48/lib/libQtCore.so
> 
> rpath info is missing. This is the case with the genex $<1:Qt4::QtCore> too. 
> Where should that be added?

Good catch.

It looks like cmTarget::HaveBuildTreeRPATH still references the old
cmTarget::LinkLibraries member which is not populated by a genex.
It should be refactored to use the new link info.

-Brad



More information about the cmake-developers mailing list