From 1781bebb123aea7425544a77b01247bd5f62e503 Mon Sep 17 00:00:00 2001 From: Scott Giese Date: Wed, 16 Dec 2020 23:34:59 -0600 Subject: [PATCH] Easy rpath solution. Supported for UNIX-like (excluding Apple, Cygwin). --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2d7b9e934..a5965add9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,6 +43,8 @@ if(APPLE) # when building, don't use the install RPATH already # (but later on when installing) SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) +elseif (UNIX AND NOT CYGWIN) + set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE CACHE BOOL "Append linker search paths to the runtime search path") endif() set(CMAKE_CXX_STANDARD 17)