Author: mcpierce
Date: Tue Aug 20 12:20:53 2013
New Revision: 1515795
URL: http://svn.apache.org/r1515795
Log:
PROTON-406: Fix installing the Ruby bindings.
Previously it checked for RUBY_VENDORLIB_DIR as provided by Cmake. But
this variable is not provided by older versions of CMake. Additionally,
older versions of Ruby did not provide a vendorlibdir. In those cases,
the behavior is to now get the Ruby sitearch dir instead.
Modified:
qpid/proton/trunk/proton-c/bindings/ruby/CMakeLists.txt
Modified: qpid/proton/trunk/proton-c/bindings/ruby/CMakeLists.txt
URL:
http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/bindings/ruby/CMakeLists.txt?rev=1515795&r1=1515794&r2=1515795&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/bindings/ruby/CMakeLists.txt (original)
+++ qpid/proton/trunk/proton-c/bindings/ruby/CMakeLists.txt Tue Aug 20 12:20:53
2013
@@ -48,10 +48,30 @@ set(RUBY_LIBRARIES
lib/qpid_proton/tracker_status.rb
)
+set(RUBY_ARCHLIB_DIR "${RUBY_VENDORLIB_DIR}")
+
+if (NOT RUBY_ARCHLIB_DIR)
+ execute_process(COMMAND ${RUBY_EXECUTABLE}
+ -r rbconfig -e "print RbConfig::CONFIG['vendorlibdir']"
+ RESULT_VARIABLE RESULT_RUBY_ARCHLIB_DIR
+ OUTPUT_VARIABLE OUTPUT_RUBY_ARCHLIB_DIR)
+
+ if(NOT RESULT_RUBY_ARCHLIB_DIR AND OUTPUT_RUBY_ARCHLIB_DIR )
+ execute_process(COMMAND ${RUBY_EXECUTABLE}
+ -r rbconfig -e "print RbConfig::CONFIG['sitearchdir']"
+ RESULT_VARIABLE RESULT_RUBY_ARCHLIB_DIR
+ OUTPUT_VARIABLE OUTPUT_RUBY_ARCHLIB_DIR)
+
+ endif()
+
+ set(RUBY_ARCHLIB_DIR "${OUTPUT_RUBY_ARCHLIB_DIR}")
+
+endif ()
+
install(FILES lib/qpid_proton.rb
- DESTINATION ${RUBY_VENDORLIB_DIR}
+ DESTINATION ${RUBY_ARCHLIB_DIR}
COMPONENT Ruby)
install(FILES ${RUBY_LIBRARIES}
- DESTINATION ${RUBY_VENDORLIB_DIR}/qpid_proton
- COMPONENT RUby)
+ DESTINATION ${RUBY_ARCHLIB_DIR}/qpid_proton
+ COMPONENT Ruby)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]