diff --git a/cmake/modules/SetupCompiler.cmake b/cmake/modules/SetupCompiler.cmake index a2e28915..dc627ac3 100644 --- a/cmake/modules/SetupCompiler.cmake +++ b/cmake/modules/SetupCompiler.cmake @@ -187,12 +187,14 @@ set(CMAKE_SKIP_BUILD_RPATH FALSE) # Use same RPATH for build and install set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) +set(CMAKE_INSTALL_RPATH "${DYAD_INSTALL_LIBDIR}") + # 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) -# set(CMAKE_INSTALL_RPATH "${DYAD_INSTALL_LIBDIR}") - +# list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES +# "${DYAD_INSTALL_LIBDIR}" _IS_SYSTEM_DIR) list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${DYAD_INSTALL_LIBDIR}" _IS_SYSTEM_DIR)