@ -1,52 +1,59 @@
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" )
ELSE ( )
DOWNLOAD_FILE_UNZIP ( "https://github.com/DFHack/dfhack-bin/releases/download/0.43.05/osx32-libruby187.dylib.gz"
" g z "
$ { R U B Y L I B } . g z
" e 9 b c 4 2 6 3 5 5 7 e 6 5 2 1 2 1 b 0 5 5 a 4 6 a b b 4 f 9 7 "
$ { R U B Y L I B }
" 3 e e 5 3 5 6 7 5 9 f 7 6 4 a 4 4 0 b e 5 b 5 b 4 4 6 4 9 8 2 6 " )
ENDIF ( )
ELSEIF ( UNIX )
SET ( RUBYLIB ${ CMAKE_CURRENT_SOURCE_DIR } /linux ${ DFHACK_BUILD_ARCH } /libruby.so )
SET ( RUBYLIB_INSTALL_NAME "libruby.so" )
IF ( ${ DFHACK_BUILD_ARCH } STREQUAL 64 )
DOWNLOAD_FILE_UNZIP ( "https://github.com/DFHack/dfhack-bin/releases/download/0.43.05/linux64-libruby187.so.gz"
" g z "
$ { R U B Y L I B } . g z
" 8 e b 7 5 7 b b 9 a d a 0 8 6 0 8 9 1 4 d 8 c a 8 9 0 6 c 4 2 7 "
$ { R U B Y L I B }
" e 8 c 3 6 a 0 6 f 0 3 1 c f b f 0 2 d e f 2 8 1 6 9 b b 5 f 1 f " )
ELSE ( )
DOWNLOAD_FILE_UNZIP ( "https://github.com/DFHack/dfhack-bin/releases/download/0.43.05/linux32-libruby187.so.gz"
" g z "
$ { R U B Y L I B } . g z
" 2 d 0 6 f 5 0 6 9 f f 0 7 e a 9 3 4 e c d 4 0 d b 5 5 a 4 a c 5 "
$ { R U B Y L I B }
" b 0 0 d 8 d 7 0 8 6 c b 3 9 f 6 f d e 7 9 3 f 9 d 8 9 c b 2 d 7 " )
ENDIF ( )
ELSE ( )
SET ( RUBYLIB ${ CMAKE_CURRENT_SOURCE_DIR } /win ${ DFHACK_BUILD_ARCH } /libruby.dll )
SET ( RUBYLIB_INSTALL_NAME "libruby.dll" )
IF ( ${ DFHACK_BUILD_ARCH } STREQUAL 64 )
DOWNLOAD_FILE_UNZIP ( "https://github.com/DFHack/dfhack-bin/releases/download/0.43.05/win64-libruby200.dll.gz"
" g z "
$ { R U B Y L I B } . g z
" 8 1 d b 5 4 a 8 b 8 b 3 0 9 0 c 9 4 c 6 a e 2 1 4 7 d 3 0 b 8 f "
$ { R U B Y L I B }
" 8 a 8 5 6 4 4 1 8 a e b d d e f 3 d f e e 1 e 9 6 6 9 0 e 7 1 3 " )
# A l l o w b u i l d s y s t e m t o t u r n o f f d o w n l o a d i n g o f l i b r u b y . s o .
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_INSTALL_NAME "libruby.dylib" )
IF ( ${ DFHACK_BUILD_ARCH } STREQUAL 64 )
# 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"
" g z "
$ { R U B Y L I B } . g z
" e 9 b c 4 2 6 3 5 5 7 e 6 5 2 1 2 1 b 0 5 5 a 4 6 a b b 4 f 9 7 "
$ { R U B Y L I B }
" 3 e e 5 3 5 6 7 5 9 f 7 6 4 a 4 4 0 b e 5 b 5 b 4 4 6 4 9 8 2 6 " )
ENDIF ( )
ELSEIF ( UNIX )
SET ( RUBYLIB ${ CMAKE_CURRENT_SOURCE_DIR } /linux ${ DFHACK_BUILD_ARCH } /libruby.so )
SET ( RUBYLIB_INSTALL_NAME "libruby.so" )
IF ( ${ DFHACK_BUILD_ARCH } STREQUAL 64 )
DOWNLOAD_FILE_UNZIP ( "https://github.com/DFHack/dfhack-bin/releases/download/0.43.05/linux64-libruby187.so.gz"
" g z "
$ { R U B Y L I B } . g z
" 8 e b 7 5 7 b b 9 a d a 0 8 6 0 8 9 1 4 d 8 c a 8 9 0 6 c 4 2 7 "
$ { R U B Y L I B }
" e 8 c 3 6 a 0 6 f 0 3 1 c f b f 0 2 d e f 2 8 1 6 9 b b 5 f 1 f " )
ELSE ( )
DOWNLOAD_FILE_UNZIP ( "https://github.com/DFHack/dfhack-bin/releases/download/0.43.05/linux32-libruby187.so.gz"
" g z "
$ { R U B Y L I B } . g z
" 2 d 0 6 f 5 0 6 9 f f 0 7 e a 9 3 4 e c d 4 0 d b 5 5 a 4 a c 5 "
$ { R U B Y L I B }
" b 0 0 d 8 d 7 0 8 6 c b 3 9 f 6 f d e 7 9 3 f 9 d 8 9 c b 2 d 7 " )
ENDIF ( )
ELSE ( )
DOWNLOAD_FILE_UNZIP ( "https://github.com/DFHack/dfhack-bin/releases/download/0.43.05/win32-libruby187.dll.gz"
" g z "
$ { R U B Y L I B } . g z
" f f c 0 f 1 b 5 b 3 3 7 4 8 e 2 a 3 6 1 2 8 e 9 0 c 9 7 f 6 b 2 "
$ { R U B Y L I B }
" 4 8 2 c 1 c 4 1 8 f 4 e e 1 a 5 f 0 4 2 0 3 e e e 1 c d a 0 e f " )
SET ( RUBYLIB ${ CMAKE_CURRENT_SOURCE_DIR } /win ${ DFHACK_BUILD_ARCH } /libruby.dll )
SET ( RUBYLIB_INSTALL_NAME "libruby.dll" )
IF ( ${ DFHACK_BUILD_ARCH } STREQUAL 64 )
DOWNLOAD_FILE_UNZIP ( "https://github.com/DFHack/dfhack-bin/releases/download/0.43.05/win64-libruby200.dll.gz"
" g z "
$ { R U B Y L I B } . g z
" 8 1 d b 5 4 a 8 b 8 b 3 0 9 0 c 9 4 c 6 a e 2 1 4 7 d 3 0 b 8 f "
$ { R U B Y L I B }
" 8 a 8 5 6 4 4 1 8 a e b d d e f 3 d f e e 1 e 9 6 6 9 0 e 7 1 3 " )
ELSE ( )
DOWNLOAD_FILE_UNZIP ( "https://github.com/DFHack/dfhack-bin/releases/download/0.43.05/win32-libruby187.dll.gz"
" g z "
$ { R U B Y L I B } . g z
" f f c 0 f 1 b 5 b 3 3 7 4 8 e 2 a 3 6 1 2 8 e 9 0 c 9 7 f 6 b 2 "
$ { R U B Y L I B }
" 4 8 2 c 1 c 4 1 8 f 4 e e 1 a 5 f 0 4 2 0 3 e e e 1 c d a 0 e f " )
ENDIF ( )
ENDIF ( )
ENDIF ( )
IF ( APPLE OR UNIX )
@ -73,7 +80,8 @@ ADD_DEPENDENCIES(ruby ruby-autogen-rb)
IF ( EXISTS ${ RUBYLIB } )
INSTALL ( FILES ${ RUBYLIB } DESTINATION ${ DFHACK_LIBRARY_DESTINATION } RENAME ${ RUBYLIB_INSTALL_NAME } )
ELSE ( )
IF ( NOT(APPLE AND ${ DFHACK_BUILD_ARCH } STREQUAL 64 ) )
# O n l y f i r e t h i s w a r n i n g i f D O W N L O A D _ R U B Y w a s s e t .
IF ( NOT(APPLE AND ${ DFHACK_BUILD_ARCH } STREQUAL 64 ) A N D D O W N L O A D _ R U B Y )
MESSAGE ( WARNING "Ruby library not found at ${RUBYLIB} - will not be installed" )
ENDIF ( )
ENDIF ( )