[Groonga-commit] groonga/groonga at a0967bb [master] cmake: find ruby dynamically

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Mar 10 12:39:30 JST 2015


Kouhei Sutou	2015-03-10 12:39:30 +0900 (Tue, 10 Mar 2015)

  New Revision: a0967bbe3608dbf402b4f81957b86d3cfa2cb8af
  https://github.com/groonga/groonga/commit/a0967bbe3608dbf402b4f81957b86d3cfa2cb8af

  Message:
    cmake: find ruby dynamically

  Modified files:
    CMakeLists.txt
    vendor/mruby/CMakeLists.txt

  Modified: CMakeLists.txt (+2 -1)
===================================================================
--- CMakeLists.txt    2015-03-10 12:26:32 +0900 (60a8e76)
+++ CMakeLists.txt    2015-03-10 12:39:30 +0900 (03977a9)
@@ -529,6 +529,8 @@ else()
   set(GRN_WITH_MESSAGE_PACK FALSE)
 endif()
 
+find_program(GRN_RUBY NAMES "ruby2.1" "ruby21" "ruby")
+
 option(GRN_WITH_MRUBY "use mruby" OFF)
 if(GRN_WITH_MRUBY)
   set(GRN_WITH_ONIGMO_DEFAULT ON)
@@ -564,7 +566,6 @@ endif()
 
 configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
 
-set(RUBY "ruby") # TODO: support customization
 set(GROONGA "${CMAKE_CURRENT_BINARY_DIR}/src/groonga")
 set(GROONGA_SUGGEST_CREATE_DATASET
   "${CMAKE_CURRENT_BINARY_DIR}/src/suggest/groonga-suggest-create-dataset")

  Modified: vendor/mruby/CMakeLists.txt (+1 -1)
===================================================================
--- vendor/mruby/CMakeLists.txt    2015-03-10 12:26:32 +0900 (21dbda1)
+++ vendor/mruby/CMakeLists.txt    2015-03-10 12:39:30 +0900 (7b43b17)
@@ -40,7 +40,7 @@ if(GRN_WITH_MRUBY)
     if(NOT EXISTS "${mruby_build_timestamp}")
       execute_process(
 	COMMAND
-	"ruby"
+	"${GRN_RUBY}"
 	"${CMAKE_CURRENT_SOURCE_DIR}/mruby_build.rb"
 	"${CMAKE_CURRENT_SOURCE_DIR}/build_config.rb"
 	"${CMAKE_CURRENT_SOURCE_DIR}/../mruby-source"
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index