[CMake] missing -rpath-link flag

Clinton Stimpson clinton at elemtech.com
Thu Jan 2 17:25:37 EST 2014


I have an example (attached) that gives a link error because an -rpath-link 
flag is missing.

If I change the line
add_library(static STATIC static.cpp)
to
add_library(static SHARED static.cpp)

then the problem goes away.

Also, if I change 
target_link_libraries(shared2 static)
to
target_link_libraries(shared2 static sharedb)
the problem goes away.

I had assumed anything done with target_link_libraries() on static libraries 
would be pushed up to the shared libraries/executables as needed.
But in this case, it doesn't.  Is this a bug in CMake?  

-- 
Clinton Stimpson
Elemental Technologies, Inc
Computational Simulation Software, LLC
www.csimsoft.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-rpath-link.tar.gz
Type: application/x-compressed-tar
Size: 807 bytes
Desc: not available
URL: <http://www.cmake.org/pipermail/cmake/attachments/20140102/04a2ed08/attachment.bin>


More information about the CMake mailing list