| From 9505f69390ddde3ff45b0f52180d59ae7ae9b37e Mon Sep 17 00:00:00 2001 |
| From: Robin Sommer <robin@icir.org> |
| Date: Mon, 1 Sep 2014 08:31:32 -0700 |
| Subject: [PATCH] Adapting library's install_name on Darwin to installation |
| prefix. |
| |
| --- |
| src/CMakeLists.txt | 6 ++++-- |
| 1 file changed, 4 insertions(+), 2 deletions(-) |
| |
| diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt |
| index 774ef27..4e581a0 100644 |
| --- a/src/CMakeLists.txt |
| +++ b/src/CMakeLists.txt |
| @@ -67,12 +67,13 @@ if ( APPLE ) |
| list(APPEND link_flags |
| "-compatibility_version 1" |
| "-current_version 1" |
| - "-install_name /usr/lib/libc++abi.1.dylib" |
| + "-install_name ${CMAKE_INSTALL_PREFIX}/lib/libc++abi.1.dylib" |
| "/usr/lib/libSystem.B.dylib") |
| else() |
| list(APPEND link_flags |
| "-compatibility_version 1" |
| - "-install_name /usr/lib/libc++abi.1.dylib") |
| + "-install_name ${CMAKE_INSTALL_PREFIX}/lib/libc++abi.1.dylib" |
| + "-nodefaultlibs") |
| endif() |
| endif() |
| |
| @@ -86,6 +87,7 @@ set_target_properties(cxxabi |
| OUTPUT_NAME "c++abi" |
| VERSION "1.0" |
| SOVERSION "1" |
| + INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib" |
| ) |
| |
| install(TARGETS cxxabi |
| -- |
| 2.1.0 |
| |