Commit patch submitted by Orion Poplawski on Nov 18th 2015 on LAPACK mailing List
authorjulie <julielangou@users.noreply.github.com>
Thu, 19 Nov 2015 05:47:49 +0000 (05:47 +0000)
committerjulie <julielangou@users.noreply.github.com>
Thu, 19 Nov 2015 05:47:49 +0000 (05:47 +0000)
Fix: properly avoid setting the install rpath when installing to system directories.

CMakeLists.txt

index ab29bd274cbd49c719324f4a4fc6f36a37b9126c..254bcbcedf2cf763ea69769e2bc855dadc711084 100644 (file)
@@ -17,11 +17,10 @@ set(
     set(CMAKE_MACOSX_RPATH ON)
     set(CMAKE_SKIP_BUILD_RPATH FALSE)
     set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
-    set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
-    set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
-    list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)
+    list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" isSystemDir)
     if("${isSystemDir}" STREQUAL "-1")
-        set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
+        set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
+        set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
     endif()