|
|
@ -1,4 +1,9 @@
|
|
|
|
IF (APPLE)
|
|
|
|
# Allow build system to turn off downloading of libruby.so.
|
|
|
|
|
|
|
|
OPTION(DOWNLOAD_RUBY "Download prebuilt libruby.so for ruby plugin." ON)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IF (DOWNLOAD_RUBY)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IF (APPLE)
|
|
|
|
SET(RUBYLIB ${CMAKE_CURRENT_SOURCE_DIR}/osx${DFHACK_BUILD_ARCH}/libruby.dylib)
|
|
|
|
SET(RUBYLIB ${CMAKE_CURRENT_SOURCE_DIR}/osx${DFHACK_BUILD_ARCH}/libruby.dylib)
|
|
|
|
SET(RUBYLIB_INSTALL_NAME "libruby.dylib")
|
|
|
|
SET(RUBYLIB_INSTALL_NAME "libruby.dylib")
|
|
|
|
IF(${DFHACK_BUILD_ARCH} STREQUAL 64)
|
|
|
|
IF(${DFHACK_BUILD_ARCH} STREQUAL 64)
|
|
|
@ -11,7 +16,7 @@ IF (APPLE)
|
|
|
|
${RUBYLIB}
|
|
|
|
${RUBYLIB}
|
|
|
|
"3ee5356759f764a440be5b5b44649826")
|
|
|
|
"3ee5356759f764a440be5b5b44649826")
|
|
|
|
ENDIF()
|
|
|
|
ENDIF()
|
|
|
|
ELSEIF(UNIX)
|
|
|
|
ELSEIF(UNIX)
|
|
|
|
SET(RUBYLIB ${CMAKE_CURRENT_SOURCE_DIR}/linux${DFHACK_BUILD_ARCH}/libruby.so)
|
|
|
|
SET(RUBYLIB ${CMAKE_CURRENT_SOURCE_DIR}/linux${DFHACK_BUILD_ARCH}/libruby.so)
|
|
|
|
SET(RUBYLIB_INSTALL_NAME "libruby.so")
|
|
|
|
SET(RUBYLIB_INSTALL_NAME "libruby.so")
|
|
|
|
IF(${DFHACK_BUILD_ARCH} STREQUAL 64)
|
|
|
|
IF(${DFHACK_BUILD_ARCH} STREQUAL 64)
|
|
|
@ -29,7 +34,7 @@ ELSEIF(UNIX)
|
|
|
|
${RUBYLIB}
|
|
|
|
${RUBYLIB}
|
|
|
|
"b00d8d7086cb39f6fde793f9d89cb2d7")
|
|
|
|
"b00d8d7086cb39f6fde793f9d89cb2d7")
|
|
|
|
ENDIF()
|
|
|
|
ENDIF()
|
|
|
|
ELSE()
|
|
|
|
ELSE()
|
|
|
|
SET(RUBYLIB ${CMAKE_CURRENT_SOURCE_DIR}/win${DFHACK_BUILD_ARCH}/libruby.dll)
|
|
|
|
SET(RUBYLIB ${CMAKE_CURRENT_SOURCE_DIR}/win${DFHACK_BUILD_ARCH}/libruby.dll)
|
|
|
|
SET(RUBYLIB_INSTALL_NAME "libruby.dll")
|
|
|
|
SET(RUBYLIB_INSTALL_NAME "libruby.dll")
|
|
|
|
IF(${DFHACK_BUILD_ARCH} STREQUAL 64)
|
|
|
|
IF(${DFHACK_BUILD_ARCH} STREQUAL 64)
|
|
|
@ -47,6 +52,8 @@ ELSE()
|
|
|
|
${RUBYLIB}
|
|
|
|
${RUBYLIB}
|
|
|
|
"482c1c418f4ee1a5f04203eee1cda0ef")
|
|
|
|
"482c1c418f4ee1a5f04203eee1cda0ef")
|
|
|
|
ENDIF()
|
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
|
|
|
|
ENDIF()
|
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
|
|
|
|
IF (APPLE OR UNIX)
|
|
|
|
IF (APPLE OR UNIX)
|
|
|
@ -73,7 +80,8 @@ ADD_DEPENDENCIES(ruby ruby-autogen-rb)
|
|
|
|
IF(EXISTS ${RUBYLIB})
|
|
|
|
IF(EXISTS ${RUBYLIB})
|
|
|
|
INSTALL(FILES ${RUBYLIB} DESTINATION ${DFHACK_LIBRARY_DESTINATION} RENAME ${RUBYLIB_INSTALL_NAME})
|
|
|
|
INSTALL(FILES ${RUBYLIB} DESTINATION ${DFHACK_LIBRARY_DESTINATION} RENAME ${RUBYLIB_INSTALL_NAME})
|
|
|
|
ELSE()
|
|
|
|
ELSE()
|
|
|
|
IF(NOT(APPLE AND ${DFHACK_BUILD_ARCH} STREQUAL 64))
|
|
|
|
# Only fire this warning if DOWNLOAD_RUBY was set.
|
|
|
|
|
|
|
|
IF(NOT(APPLE AND ${DFHACK_BUILD_ARCH} STREQUAL 64) AND DOWNLOAD_RUBY)
|
|
|
|
MESSAGE(WARNING "Ruby library not found at ${RUBYLIB} - will not be installed")
|
|
|
|
MESSAGE(WARNING "Ruby library not found at ${RUBYLIB} - will not be installed")
|
|
|
|
ENDIF()
|
|
|
|
ENDIF()
|
|
|
|
ENDIF()
|
|
|
|
ENDIF()
|
|
|
|