[clfft] 10/64: properly use the rpath on mac

Jérôme Kieffer kieffer-guest at moszumanska.debian.org
Wed May 20 07:33:32 UTC 2015


This is an automated email from the git hooks/post-receive script.

kieffer-guest pushed a commit to branch develop
in repository clfft.

commit 74dcadba5bd7d2164cca9eb84453b603aaf099e1
Author: Gaëtan Lehmann <gaetan.lehmann at gmail.com>
Date:   Sun Feb 22 03:22:19 2015 +0100

    properly use the rpath on mac
    
    so the client can be fully relocatable
---
 src/CMakeLists.txt        | 5 +++++
 src/client/CMakeLists.txt | 4 ++++
 2 files changed, 9 insertions(+)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index d46c193..2e50f2c 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -187,6 +187,11 @@ get_filename_component( C_COMPILER_NAME ${CMAKE_C_COMPILER} NAME_WE )
 # message( "C_COMPILER_NAME: " ${C_COMPILER_NAME} )
 # message( "CMAKE_C_COMPILER: " ${CMAKE_C_COMPILER} )
 
+if(APPLE)
+    # avoid warning on newer cmake versions
+    set(CMAKE_MACOSX_RPATH 0)
+endif()
+
 # Set common compile and link options
 if( MSVC )
 	# Following options for nMake
diff --git a/src/client/CMakeLists.txt b/src/client/CMakeLists.txt
index 3b38b95..649d856 100644
--- a/src/client/CMakeLists.txt
+++ b/src/client/CMakeLists.txt
@@ -49,6 +49,10 @@ target_link_libraries( clFFT-client clFFT ${Boost_LIBRARIES} ${OPENCL_LIBRARIES}
 
 set_target_properties( clFFT-client PROPERTIES VERSION ${CLFFT_VERSION} )
 set_target_properties( clFFT-client PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/staging" )
+if( APPLE )
+    # properly deal with RPATH on mac
+    set_target_properties( clFFT-client PROPERTIES INSTALL_RPATH "@loader_path/../lib${SUFFIX_LIB}")
+endif()
 
 # CPack configuration; include the executable into the package
 install( TARGETS clFFT-client

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/clfft.git



More information about the debian-science-commits mailing list