From ad3de53e4a0a3ef137f1ea5ee2417980f46efcb5 Mon Sep 17 00:00:00 2001 From: Bernard Ogden Date: Mon, 24 Feb 2014 22:23:43 +0000 Subject: [PATCH] Permit CMAKE_INSTALL_RPATH to be set on command line Commit 201921 overrides setting of CMAKE_INSTALL_RPATH via the command line. Last time this happened we applied another patch to only set CMAKE_INSTALL_RPATH if already defined (r197825). This patch does the same thing again, but only for the UNIX case - we leave APPLE alone as presumably the original committer is happy with the non-overriding behaviour. llvm-svn: 202085 --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 21c64b0b926..aa2fe14fe23 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -428,7 +428,9 @@ if (APPLE) set(CMAKE_INSTALL_NAME_DIR "@rpath") set(CMAKE_INSTALL_RPATH "@executable_path/../lib") else(UNIX) - set(CMAKE_INSTALL_RPATH "\$ORIGIN/../lib") + if(NOT DEFINED CMAKE_INSTALL_RPATH) + set(CMAKE_INSTALL_RPATH "\$ORIGIN/../lib") + endif(NOT DEFINED CMAKE_INSTALL_RPATH) endif() set(CMAKE_INCLUDE_CURRENT_DIR ON)