Use system libruby on osx64 (since ruby 1.8 and 2 are supported now)

develop
lethosor 2016-10-29 19:08:54 -04:00
parent 8b7af8ba09
commit 9e97ccbb50
2 changed files with 8 additions and 2 deletions

@ -2,7 +2,7 @@ IF (APPLE)
SET(RUBYLIB ${CMAKE_CURRENT_SOURCE_DIR}/osx${DFHACK_BUILD_ARCH}/libruby.dylib)
SET(RUBYLIB_INSTALL_NAME "libruby.dylib")
IF(${DFHACK_BUILD_ARCH} STREQUAL 64)
MESSAGE("No ruby lib for 64-bit OS X yet")
# MESSAGE("No ruby lib for 64-bit OS X yet")
ELSE()
DOWNLOAD_FILE_UNZIP("https://github.com/DFHack/dfhack-bin/releases/download/0.43.05/osx32-libruby187.dylib.gz"
"gz"
@ -73,7 +73,9 @@ ADD_DEPENDENCIES(ruby ruby-autogen-rb)
IF(EXISTS ${RUBYLIB})
INSTALL(FILES ${RUBYLIB} DESTINATION ${DFHACK_LIBRARY_DESTINATION} RENAME ${RUBYLIB_INSTALL_NAME})
ELSE()
MESSAGE(WARNING "Ruby library not found at ${RUBYLIB} - will not be installed")
IF(NOT(APPLE AND ${DFHACK_BUILD_ARCH} STREQUAL 64))
MESSAGE(WARNING "Ruby library not found at ${RUBYLIB} - will not be installed")
ENDIF()
ENDIF()
INSTALL(DIRECTORY .

@ -322,7 +322,11 @@ static int df_loadruby(void)
#if defined(WIN32)
"./libruby.dll";
#elif defined(__APPLE__)
#ifdef DFHACK64
"/System/Library/Frameworks/Ruby.framework/Ruby";
#else
"hack/libruby.dylib";
#endif
#else
"hack/libruby.so";
#endif