diff options
author | Thomas White <taw@physics.org> | 2018-05-28 09:54:59 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2018-05-28 09:56:18 +0200 |
commit | 1f8702b379a9e35ac1a39cdce5b857e92fc8d2cc (patch) | |
tree | 53dfacdbbe897a81616fce20aa79ae7dd1f9a3e0 /CMakeLists.txt | |
parent | 1d6d33fa8b48cdad26be44465477ec0c56f02741 (diff) |
Fix linker run path
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 706c23b4..665aa482 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,8 +32,9 @@ set(CMAKE_C_STANDARD 99) # Make programs work without LD_LIBRARY_PATH when installed to a non system directory list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir) if("${isSystemDir}" STREQUAL "-1") - set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") + set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib:${CMAKE_INSTALL_RPATH}") endif("${isSystemDir}" STREQUAL "-1") +set(CMAKE_INSTALL_RPATH_USE_LINK_PATH 1) # Common include directories and libraries |