On 09/27/2018 08:03 PM, Hendrik Greving wrote: > Thanks. Ok one step back. What we want is to have the same relative path > from binary/executable to linked library in build and install tree > (which we assume is the same for us). Looks like by default, > e.g. cmake 3.9, puts in an absolute path.
CMake puts in absolute RPATH values in the build tree to make things run there. There is a separate INSTALL_RPATH target property that can be set to the RPATH to be used in the install tree. Since your install rules control the relative layout in the install tree independent of the build tree layout, then your project code can set INSTALL_RPATH to $ORIGIN/... as needed for wherever it installs things. -Brad -- 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: https://cmake.org/mailman/listinfo/cmake