make FindRuby work on Windows e.g. with ruby 1.9.1 (version string was constructed wrong)

Alex
This commit is contained in:
Alexander Neundorf 2010-01-03 14:21:17 -05:00
parent 827b636393
commit 241dd18004
1 changed files with 5 additions and 4 deletions

View File

@ -152,6 +152,7 @@ ENDIF(NOT RUBY_VERSION_MAJOR)
SET(RUBY_VERSION "${RUBY_VERSION_MAJOR}.${RUBY_VERSION_MINOR}.${RUBY_VERSION_PATCH}")
SET(_RUBY_VERSION_SHORT "${RUBY_VERSION_MAJOR}.${RUBY_VERSION_MINOR}")
SET(_RUBY_VERSION_SHORT_NODOT "${RUBY_VERSION_MAJOR}${RUBY_VERSION_MINOR}")
SET(_RUBY_NODOT_VERSION "${RUBY_VERSION_MAJOR}${RUBY_VERSION_MINOR}${RUBY_VERSION_PATCH}")
# Now we know which version we found
IF(Ruby_FIND_VERSION)
@ -214,10 +215,10 @@ IF(WIN32)
ENDIF( MSVC90 )
LIST(APPEND _RUBY_POSSIBLE_LIB_NAMES
"msvcr${_RUBY_MSVC_RUNTIME}-ruby${RUBY_NODOT_VERSION}"
"msvcr${_RUBY_MSVC_RUNTIME}-ruby${RUBY_NODOT_VERSION}-static"
"msvcrt-ruby${RUBY_NODOT_VERSION}"
"msvcrt-ruby${RUBY_NODOT_VERSION}-static" )
"msvcr${_RUBY_MSVC_RUNTIME}-ruby${_RUBY_NODOT_VERSION}"
"msvcr${_RUBY_MSVC_RUNTIME}-ruby${_RUBY_NODOT_VERSION}-static"
"msvcrt-ruby${_RUBY_NODOT_VERSION}"
"msvcrt-ruby${_RUBY_NODOT_VERSION}-static" )
ENDIF(WIN32)
FIND_LIBRARY(RUBY_LIBRARY NAMES ${_RUBY_POSSIBLE_LIB_NAMES} HINTS ${RUBY_POSSIBLE_LIB_DIR} )