summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorBernard Ogden <bogden@arm.com>2014-02-24 22:23:43 +0000
committerBernard Ogden <bogden@arm.com>2014-02-24 22:23:43 +0000
commit70b3b7d06fab76efa08c21d75242ab3a64d8cf91 (patch)
treeabb5993d45c12e5010ba3326123040edc283c350 /CMakeLists.txt
parent0aedb78442fc4d3ac011439b5046413761b8b0e8 (diff)
downloadllvm-70b3b7d06fab76efa08c21d75242ab3a64d8cf91.tar.gz
llvm-70b3b7d06fab76efa08c21d75242ab3a64d8cf91.tar.bz2
llvm-70b3b7d06fab76efa08c21d75242ab3a64d8cf91.tar.xz
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202085 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 21c64b0b92..aa2fe14fe2 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)