Hi everybody,
how can I set the gcc option "-Wl,-rpath-link," with CMake?
I've tried the following, but I always end up with "-Wl,-rpath," only:
# RPATH settings for linking shared libraries
# skip the full RPATH for the build tree
SET(CMAKE_SKIP_BUILD_RPATH TRUE)
# when building, use the install RPATH already
# (so it doesn't need to relink when installing)
SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
# the RPATH to be used when installing
#SET(CMAKE_INSTALL_RPATH
"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}:${ACE_ROOT}/lib:${LIBXML_2_ROOT}/lib:${LIBXML_PP_ROOT}/lib:${LOG4_CXX_ROOT}/lib:${RUBY_ROOT}/lib")
# add the automatically determined parts of the RPATH
# which point to directories outside the build tree to the install RPATH
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
I also found somebody using the following, but the used variable seems to be
deprecated as I could not find it in the current CMake documentation:
SET(CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG "-Wl,-rpath-link,")
Best Regards,
Joerg
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake