From 87e41c47c973af78de07a0ae1d3b56179589b9b5 Mon Sep 17 00:00:00 2001
From: Florent Pruvost <florent.pruvost@inria.fr>
Date: Thu, 27 Nov 2014 15:51:31 +0000
Subject: [PATCH] add 'RPATH' config

---
 CMakeLists.txt | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1e797b731..9b05024a0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -65,6 +65,19 @@ include(GenPkgConfig)
 add_definitions(-DADD_)
 
 
+# Set the RPATH config
+# --------------------
+
+# use, i.e. don't skip the full RPATH for the build tree
+set(CMAKE_SKIP_BUILD_RPATH  FALSE)
+
+# when building, don't use the install RPATH already
+# (but later on when installing)
+set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) 
+
+# the RPATH to be used when installing
+set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
+
 # Misc options
 # ------------
 option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
-- 
GitLab