Warn if ruby library is missing instead of breaking installation

develop
lethosor 2016-09-26 18:28:59 -04:00
parent caa6a81669
commit 714ba1a030
1 changed files with 5 additions and 1 deletions

@ -65,7 +65,11 @@ INCLUDE_DIRECTORIES("${dfhack_SOURCE_DIR}/depends/tthread")
DFHACK_PLUGIN(ruby ruby.cpp LINK_LIBRARIES dfhack-tinythread)
ADD_DEPENDENCIES(ruby ruby-autogen-rb)
INSTALL(FILES ${RUBYLIB} DESTINATION ${DFHACK_LIBRARY_DESTINATION} RENAME ${RUBYLIB_INSTALL_NAME})
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")
ENDIF()
INSTALL(DIRECTORY .
DESTINATION hack/ruby