ENH: move EstimateFormatLength to kwsys
[cmake.git] / Modules / FindRuby.cmake
blobdfc811a7d01ac29e896d756e506409ca285686b9
2 # This module finds if RUBY is installed and determines where the include files
3 # and libraries are. It also determines what the name of the library is. This
4 # code sets the following variables:
6 #  RUBY_INCLUDE_PATH       = path to where object.h can be found
7 #  RUBY_EXECUTABLE         = full path to the ruby binary
10 SET(RUBY_POSSIBLE_INCLUDE_PATHS
11   /usr/lib/ruby/1.8/i386-linux
12   )
14 SET(RUBY_POSSIBLE_LIB_PATHS
15   /usr/lib
16   )
18 FIND_PATH(RUBY_INCLUDE_PATH ruby.h
19   ${RUBY_POSSIBLE_INCLUDE_PATHS})
21 FIND_LIBRARY(RUBY_LIBRARY
22   NAMES ruby1.8
23   PATHS ${RUBY_POSSIBLE_LIB_PATHS}
24   )
26 FIND_PROGRAM(RUBY_EXECUTABLE
27   NAMES ruby1.8
28   PATHS
29   /usr/bin
30   /usr/local/bin
33 MARK_AS_ADVANCED(
34   RUBY_EXECUTABLE
35   RUBY_LIBRARY
36   RUBY_INCLUDE_PATH
37   )