mirror of
https://github.com/reactos/CMake.git
synced 2024-11-25 12:40:06 +00:00
Merge topic 'FindRubyFixes'
a9bca05
FindRuby.cmake: add more debug output3db2c8b
FindRuby: add more possible library names (for ubuntu, #12172)93c55ec
FindRuby: fix usage of RUBY_VERSION_MAJOR (#12172)
This commit is contained in:
commit
4828b7ba30
@ -60,7 +60,7 @@ ENDIF("${Ruby_FIND_VERSION_SHORT_NODOT}" VERSION_LESS "19")
|
||||
FIND_PROGRAM(RUBY_EXECUTABLE NAMES ${_RUBY_POSSIBLE_EXECUTABLE_NAMES})
|
||||
|
||||
|
||||
IF(RUBY_EXECUTABLE AND NOT RUBY_MAJOR_VERSION)
|
||||
IF(RUBY_EXECUTABLE AND NOT RUBY_VERSION_MAJOR)
|
||||
# query the ruby version
|
||||
EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print Config::CONFIG['MAJOR']"
|
||||
OUTPUT_VARIABLE RUBY_VERSION_MAJOR)
|
||||
@ -135,7 +135,7 @@ IF(RUBY_EXECUTABLE AND NOT RUBY_MAJOR_VERSION)
|
||||
RUBY_VERSION_MINOR
|
||||
RUBY_VERSION_PATCH
|
||||
)
|
||||
ENDIF(RUBY_EXECUTABLE AND NOT RUBY_MAJOR_VERSION)
|
||||
ENDIF(RUBY_EXECUTABLE AND NOT RUBY_VERSION_MAJOR)
|
||||
|
||||
# In case RUBY_EXECUTABLE could not be executed (e.g. cross compiling)
|
||||
# try to detect which version we found. This is not too good.
|
||||
@ -180,7 +180,7 @@ ENDIF( ${Ruby_FIND_VERSION_SHORT_NODOT} GREATER 18 OR ${_RUBY_VERSION_SHORT_NO
|
||||
|
||||
|
||||
# Determine the list of possible names for the ruby library
|
||||
SET(_RUBY_POSSIBLE_LIB_NAMES ruby ruby-static ruby${_RUBY_VERSION_SHORT} ruby${_RUBY_VERSION_SHORT_NODOT})
|
||||
SET(_RUBY_POSSIBLE_LIB_NAMES ruby ruby-static ruby${_RUBY_VERSION_SHORT} ruby${_RUBY_VERSION_SHORT_NODOT} ruby-${_RUBY_VERSION_SHORT} ruby-${RUBY_VERSION})
|
||||
|
||||
IF(WIN32)
|
||||
SET( _RUBY_MSVC_RUNTIME "" )
|
||||
@ -224,6 +224,10 @@ IF(_RUBY_DEBUG_OUTPUT)
|
||||
MESSAGE(STATUS "RUBY_POSSIBLE_LIB_DIR: ${RUBY_POSSIBLE_LIB_DIR}")
|
||||
MESSAGE(STATUS "Found RUBY_VERSION: \"${RUBY_VERSION}\" , short: \"${_RUBY_VERSION_SHORT}\", nodot: \"${_RUBY_VERSION_SHORT_NODOT}\"")
|
||||
MESSAGE(STATUS "_RUBY_REQUIRED_VARS: ${_RUBY_REQUIRED_VARS}")
|
||||
MESSAGE(STATUS "RUBY_EXECUTABLE: ${RUBY_EXECUTABLE}")
|
||||
MESSAGE(STATUS "RUBY_LIBRARY: ${RUBY_LIBRARY}")
|
||||
MESSAGE(STATUS "RUBY_INCLUDE_DIR: ${RUBY_INCLUDE_DIR}")
|
||||
MESSAGE(STATUS "RUBY_CONFIG_INCLUDE_DIR: ${RUBY_CONFIG_INCLUDE_DIR}")
|
||||
MESSAGE(STATUS "--------------------")
|
||||
ENDIF(_RUBY_DEBUG_OUTPUT)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user