← Back to team overview

zorba-coders team mailing list archive

[Merge] lp:~zorba-coders/zorba/ruby-rpath into lp:zorba

 

Chris Hillery has proposed merging lp:~zorba-coders/zorba/ruby-rpath into lp:zorba.

Requested reviews:
  Chris Hillery (ceejatec)
  Matthias Brantner (matthias-brantner)

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/ruby-rpath/+merge/80409
-- 
https://code.launchpad.net/~zorba-coders/zorba/ruby-rpath/+merge/80409
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'swig/ruby/CMakeLists.txt'
--- swig/ruby/CMakeLists.txt	2011-09-02 19:58:59 +0000
+++ swig/ruby/CMakeLists.txt	2011-10-26 00:58:25 +0000
@@ -28,6 +28,13 @@
   ELSE (WIN32)
     SWIG_ADD_MODULE(zorba_api ruby zorba_api.i)
     SWIG_LINK_LIBRARIES(zorba_api zorba_simplestore ${RUBY_LIBRARY})
+    # Necessary because UseSWIG.cmake uses ADD_LIBRARY(..MODULE..), which
+    # apparently doesn't allow CMake's RPATH-rewriting magic to work.
+    GET_TARGET_PROPERTY(_rpath zorba_simplestore LOCATION)
+    GET_FILENAME_COMPONENT(_rpath "${_rpath}" PATH)
+    SET_TARGET_PROPERTIES(zorba_api PROPERTIES
+      INSTALL_RPATH "${CMAKE_INSTALL_RPATH}:${_rpath}"
+      BUILD_WITH_INSTALL_RPATH ON)
   ENDIF (WIN32)
 
   IF ( APPLE )
@@ -67,6 +74,7 @@
       
     ENDIF ( LINUX )
   ENDIF ( APPLE )
+
 ELSE (RUBY_LIBRARY AND RUBY_INCLUDE_PATH)
   MESSAGE(STATUS "SWIG Ruby: binding not generated because library and include files are not installed.")
 ENDIF (RUBY_LIBRARY AND RUBY_INCLUDE_PATH)


Follow ups