diff options
author | Steve Glass <smdg@hush.com> | 2016-01-24 10:46:24 +1000 |
---|---|---|
committer | Steve Glass <smdg@hush.com> | 2016-02-26 07:13:44 +1000 |
commit | 3f4b949aa2aa89ee18cdcf8d33646008c2899238 (patch) | |
tree | db382ef688a638d1a7b1991675dd9866a0d10fc5 /CMakeLists.txt | |
parent | 64f73887b07551d9a603f920063af04263fb03a7 (diff) |
Change CMakeLists.txt for OSX
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c8fac31..0387fc5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -142,6 +142,21 @@ set(GR_GSM_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include CACHE INTERNAL "" FO set(GR_GSM_SWIG_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/swig CACHE INTERNAL "" FORCE) ######################################################################## +# On Apple only, set install name and use rpath correctly, if not already set +######################################################################## +if(APPLE) + if(NOT CMAKE_INSTALL_NAME_DIR) + set(CMAKE_INSTALL_NAME_DIR ${CMAKE_INSTALL_PREFIX}/${GR_LIBRARY_DIR} CACHE PATH "Library Install Name Destination Directory" FORCE) + endif(NOT CMAKE_INSTALL_NAME_DIR) + if(NOT CMAKE_INSTALL_RPATH) + set(cmakE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/${GR_LIBRARY_DIR} CACHE PATH "Library Install RPath" FORCE) + endif(NOT CMAKE_INSTALL_RPATH) + if(NOT CMAKE_BUILD_WITH_INSTALL_RPATH) + set(CMAKE_BUILD_WITH_INSTALL_RPATH ON CACHE BOOL "Do Build Using Library Install RPath" FORCE) + endif(NOT CMAKE_BUILD_WITH_INSTALL_RPATH) +endif(APPLE) + +######################################################################## # Create uninstall target ######################################################################## configure_file( |