forked from speed-dreams/speed-dreams-code
CMakeLists.txt: Assume CMAKE_INSTALL_RPATH for packaging
CPack does not install to CMAKE_INSTALL_PREFIX, but CPACK_PACKAGING_INSTALL_PREFIX. However, the executables' rpath would still be configured for ${CMAKE_INSTALL_PREFIX}/${SD_LIBDIR}/lib instead of ${CPACK_PACKAGING_INSTALL_PREFIX}/${SD_LIBDIR}/lib, making executables to fail to find their respective shared libraries. Unfortunately, CPACK_PACKAGING_INSTALL_PREFIX is not defined by CMake, but CPack, so it is not available from this context, so this commit assumes its default value. [1] [1]: https://cmake.org/cmake/help/latest/variable/CPACK_PACKAGING_INSTALL_PREFIX.html
This commit is contained in:
parent
195f223d5f
commit
6df4b6bf98
1 changed files with 1 additions and 0 deletions
|
@ -86,6 +86,7 @@ INCLUDE(cmake/checks.cmake)
|
|||
set(CMAKE_INSTALL_RPATH
|
||||
${CMAKE_INSTALL_RPATH}
|
||||
${CMAKE_INSTALL_PREFIX}/${SD_LIBDIR}/lib
|
||||
/usr/${SD_LIBDIR}/lib
|
||||
)
|
||||
|
||||
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
|
|
Loading…
Reference in a new issue