[cmake-commits] alex committed FindRuby.cmake 1.7 1.8

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Jan 2 11:43:30 EST 2008


Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv13964

Modified Files:
	FindRuby.cmake 
Log Message:
BUG: make FindRuby work with the libs for MSVC, which can have additional
pre- and suffixes (#5642)

Alex


Index: FindRuby.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindRuby.cmake,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- FindRuby.cmake	7 Dec 2006 22:37:56 -0000	1.7
+++ FindRuby.cmake	2 Jan 2008 16:43:28 -0000	1.8
@@ -21,7 +21,7 @@
 #   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 @@
    ${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}
   )
 



More information about the Cmake-commits mailing list