summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2012-01-09 19:10:15 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2012-01-09 19:10:15 (GMT)
commit4828b7ba30dc3216a40f43b2e0b072f190dc76d8 (patch)
tree4c2e18975fceb4bb5603c08517ab303484fe921e
parent5a5c32e1f22cae3cdba3e5be142ee84b9e4a8d4d (diff)
parenta9bca052f8ff013d8f47cf365495d2c8d0a2e70f (diff)
downloadCMake-4828b7ba30dc3216a40f43b2e0b072f190dc76d8.zip
CMake-4828b7ba30dc3216a40f43b2e0b072f190dc76d8.tar.gz
CMake-4828b7ba30dc3216a40f43b2e0b072f190dc76d8.tar.bz2
Merge topic 'FindRubyFixes'
a9bca05 FindRuby.cmake: add more debug output 3db2c8b FindRuby: add more possible library names (for ubuntu, #12172) 93c55ec FindRuby: fix usage of RUBY_VERSION_MAJOR (#12172)
-rw-r--r--Modules/FindRuby.cmake10
1 files changed, 7 insertions, 3 deletions
diff --git a/Modules/FindRuby.cmake b/Modules/FindRuby.cmake
index ae2ea2e..5d6c98a 100644
--- a/Modules/FindRuby.cmake
+++ b/Modules/FindRuby.cmake
@@ -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)