diff --git a/plugins/ruby/CMakeLists.txt b/plugins/ruby/CMakeLists.txt index eaa08b10b..3aeac6dc5 100644 --- a/plugins/ruby/CMakeLists.txt +++ b/plugins/ruby/CMakeLists.txt @@ -1,16 +1,18 @@ -IF (NOT APPLE) - IF (UNIX) - EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E tar xzf ${CMAKE_CURRENT_SOURCE_DIR}/libruby187.tar.gz - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) - FILE(RENAME ${CMAKE_CURRENT_BINARY_DIR}/libruby1.8.so.1.8.7 ${CMAKE_CURRENT_BINARY_DIR}/libruby.so) - SET(RUBYLIB ${CMAKE_CURRENT_BINARY_DIR}/libruby.so) - ELSE (UNIX) - EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E tar xzf ${CMAKE_CURRENT_SOURCE_DIR}/msvcrtruby187.tar.gz - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) - FILE(RENAME ${CMAKE_CURRENT_BINARY_DIR}/msvcrt-ruby18.dll ${CMAKE_CURRENT_BINARY_DIR}/libruby.dll) - SET(RUBYLIB ${CMAKE_CURRENT_BINARY_DIR}/libruby.dll) - ENDIF(UNIX) -ENDIF(NOT APPLE) +IF (APPLE) + EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E tar xzf ${CMAKE_CURRENT_SOURCE_DIR}/libruby187.osx.tar.gz + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + SET(RUBYLIB ${CMAKE_CURRENT_BINARY_DIR}/libruby.dylib) +ELSEIF(UNIX) + EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E tar xzf ${CMAKE_CURRENT_SOURCE_DIR}/libruby187.linux.tar.gz + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + FILE(RENAME ${CMAKE_CURRENT_BINARY_DIR}/libruby1.8.so.1.8.7 ${CMAKE_CURRENT_BINARY_DIR}/libruby.so) + SET(RUBYLIB ${CMAKE_CURRENT_BINARY_DIR}/libruby.so) +ELSE() + EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E tar xzf ${CMAKE_CURRENT_SOURCE_DIR}/msvcrtruby187.tar.gz + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + FILE(RENAME ${CMAKE_CURRENT_BINARY_DIR}/msvcrt-ruby18.dll ${CMAKE_CURRENT_BINARY_DIR}/libruby.dll) + SET(RUBYLIB ${CMAKE_CURRENT_BINARY_DIR}/libruby.dll) +ENDIF() IF (APPLE OR UNIX) SET(RUBYAUTOGEN ruby-autogen-gcc.rb) diff --git a/plugins/ruby/libruby187.tar.gz b/plugins/ruby/libruby187.linux.tar.gz similarity index 100% rename from plugins/ruby/libruby187.tar.gz rename to plugins/ruby/libruby187.linux.tar.gz diff --git a/plugins/ruby/libruby187.osx.tar.gz b/plugins/ruby/libruby187.osx.tar.gz new file mode 100644 index 000000000..421533957 Binary files /dev/null and b/plugins/ruby/libruby187.osx.tar.gz differ diff --git a/plugins/ruby/ruby.cpp b/plugins/ruby/ruby.cpp index ced8e4822..f27fbc3dd 100644 --- a/plugins/ruby/ruby.cpp +++ b/plugins/ruby/ruby.cpp @@ -327,7 +327,7 @@ static int df_loadruby(void) #if defined(WIN32) "./libruby.dll"; #elif defined(__APPLE__) - "/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/libruby.1.dylib"; + "hack/libruby.dylib"; #else "hack/libruby.so"; #endif