diff options
author | Alexander Neundorf <neundorf@kde.org> | 2008-01-02 16:43:28 (GMT) |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2008-01-02 16:43:28 (GMT) |
commit | 8e644c9dfa064a8de6866b5b99873ba6e51279ad (patch) | |
tree | 94843900681f3ccf4f63061869645e1d68458c97 /Modules/FindRuby.cmake | |
parent | ff04863d9d2edd2513a9a3764aa99e5a388be6fa (diff) | |
download | CMake-8e644c9dfa064a8de6866b5b99873ba6e51279ad.zip CMake-8e644c9dfa064a8de6866b5b99873ba6e51279ad.tar.gz CMake-8e644c9dfa064a8de6866b5b99873ba6e51279ad.tar.bz2 |
BUG: make FindRuby work with the libs for MSVC, which can have additional
pre- and suffixes (#5642)
Alex
Diffstat (limited to 'Modules/FindRuby.cmake')
-rw-r--r-- | Modules/FindRuby.cmake | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Modules/FindRuby.cmake b/Modules/FindRuby.cmake index 6718977..e0206fa 100644 --- a/Modules/FindRuby.cmake +++ b/Modules/FindRuby.cmake @@ -21,7 +21,7 @@ endif (RUBY_LIBRARY AND RUBY_INCLUDE_PATH) # RUBY_LIBDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"libdir"@:>@)'` # RUBY_LIBRUBYARG=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"LIBRUBYARG_SHARED"@:>@)'` -FIND_PROGRAM(RUBY_EXECUTABLE NAMES ruby ruby1.8 ruby18 ) +FIND_PROGRAM(RUBY_EXECUTABLE NAMES ruby ruby1.8 ruby18 ruby1.9 ruby19) EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts Config::CONFIG['archdir']" OUTPUT_VARIABLE RUBY_ARCH_DIR) @@ -45,8 +45,10 @@ FIND_PATH(RUBY_INCLUDE_PATH ${RUBY_ARCH_DIR} /usr/lib/ruby/1.8/i586-linux-gnu/ ) +# search the ruby library, the version for MSVC can have the "msvc" prefix and the "static" suffix FIND_LIBRARY(RUBY_LIBRARY - NAMES ruby ruby1.8 + NAMES ruby ruby1.8 ruby1.9 + msvcrt-ruby18 msvcrt-ruby19 msvcrt-ruby18-static msvcrt-ruby19-static PATHS ${RUBY_POSSIBLE_LIB_PATH} ) |