[llvm] r201936 - Revert "Revert "Use relative rpath so that the installation and build dirs are relocatable.""
Rafael Espindola
rafael.espindola at gmail.com
Sat Feb 22 05:29:31 PST 2014
Author: rafael
Date: Sat Feb 22 07:29:31 2014
New Revision: 201936
URL: http://llvm.org/viewvc/llvm-project?rev=201936&view=rev
Log:
Revert "Revert "Use relative rpath so that the installation and build dirs are relocatable.""
This reverts commit r201934.
Polly has been fixed to work with this.
Modified:
llvm/trunk/CMakeLists.txt
Modified: llvm/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=201936&r1=201935&r2=201936&view=diff
==============================================================================
--- llvm/trunk/CMakeLists.txt (original)
+++ llvm/trunk/CMakeLists.txt Sat Feb 22 07:29:31 2014
@@ -423,9 +423,13 @@ set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LL
set( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/lib )
set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/lib )
-if( NOT DEFINED CMAKE_INSTALL_RPATH )
- set( CMAKE_INSTALL_RPATH "\$ORIGIN/../lib")
-endif( NOT DEFINED CMAKE_INSTALL_RPATH )
+set(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
+if (APPLE)
+ set(CMAKE_INSTALL_NAME_DIR "@rpath")
+ set(CMAKE_INSTALL_RPATH "@executable_path/../lib")
+else(UNIX)
+ set(CMAKE_INSTALL_RPATH "\$ORIGIN/../lib")
+endif()
set(CMAKE_INCLUDE_CURRENT_DIR ON)
More information about the llvm-commits
mailing list