First, the background on why I want this: Our product uses a licensing library that creates a .so file alongside the executable, and at runtime does a dlopen() on that .so file. But it doesn't use a full path, so we need to put $ORIGIN into the RPATH or users will have to set LD_LIBRARY_PATH to the directory containing the executable. We don't have access to change the library to pass a full path to dlopen(), either. But we link against some other external libraries which might not be in the system path (e.g. the MariaDB LGPL'd client library which isn't currently available as a Debian package).
So, setting properties INSTALL_RPATH "\$ORIGIN" and BUILD_WITH_INSTALL_RPATH won't work because that will replace the automatically determined rpath entirely with $ORIGIN. Is there any way to tell CMake to combine the two just for the build version? (The installed version will put non-system libraries into a self-contained bundle so we'll still want $ORIGIN as the RPATH there.) I haven't found any setting that will do this by scanning the rpath-related CMake variables or target properties. -- Daniel Schepler
-- 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://public.kitware.com/mailman/listinfo/cmake