FindRuby.cmake 748 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #
  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:
  5. #
  6. # RUBY_INCLUDE_PATH = path to where object.h can be found
  7. # RUBY_EXECUTABLE = full path to the ruby binary
  8. #
  9. SET(RUBY_POSSIBLE_INCLUDE_PATHS
  10. /usr/lib/ruby/1.8/i386-linux
  11. )
  12. SET(RUBY_POSSIBLE_LIB_PATHS
  13. /usr/lib
  14. )
  15. FIND_PATH(RUBY_INCLUDE_PATH ruby.h
  16. ${RUBY_POSSIBLE_INCLUDE_PATHS})
  17. FIND_LIBRARY(RUBY_LIBRARY
  18. NAMES ruby1.8
  19. PATHS ${RUBY_POSSIBLE_LIB_PATHS}
  20. )
  21. FIND_PROGRAM(RUBY_EXECUTABLE
  22. NAMES ruby1.8
  23. PATHS
  24. /usr/bin
  25. /usr/local/bin
  26. )
  27. MARK_AS_ADVANCED(
  28. RUBY_EXECUTABLE
  29. RUBY_LIBRARY
  30. RUBY_INCLUDE_PATH
  31. )