From 1f8702b379a9e35ac1a39cdce5b857e92fc8d2cc Mon Sep 17 00:00:00 2001 From: Thomas White Date: Mon, 28 May 2018 09:54:59 +0200 Subject: Fix linker run path --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') 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 -- cgit v1.2.3