From 81c6b74ceae9135b594e10a364b5bbbbc85f8388 Mon Sep 17 00:00:00 2001 From: Ian Lumsden Date: Thu, 5 Sep 2024 16:47:28 -0400 Subject: [PATCH] Another attempt at RPATH --- cmake/modules/SetupCompiler.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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)