KDE/kdebindings

Richard Dale Richard_Dale at tipitina.demon.co.uk
Fri Feb 26 10:26:58 CET 2010


SVN commit 1096210 by rdale:

* Add a copy of the FindRuby.cmake script from cmake 2.8 to kdebindings, and 
stop using FindRUBY.cmake in kdelibs
* This should work with Ruby 1.9. All instances of RUBY_INCLUDE_PATH have been
replaced with RUBY_INCLUDE_DIRS
* Once cmake 2.8 is mandatory for building kde, then FindRuby.cmake in kdebindings
can be removed.

CCMAIL: kde-bindings at kde.org
CCMAIL: kde-buildsystem at kde.org



 A             cmake/modules/FindRuby.cmake  
 M  +7 -13     ruby/CMakeLists.txt  
 M  +1 -1      ruby/akonadi/CMakeLists.txt  
 M  +1 -1      ruby/kdevplatform/CMakeLists.txt  
 M  +1 -1      ruby/khtml/CMakeLists.txt  
 M  +1 -1      ruby/kio/CMakeLists.txt  
 M  +1 -1      ruby/korundum/examples/dbpedia_references/CMakeLists.txt  
 M  +1 -1      ruby/korundum/src/CMakeLists.txt  
 M  +1 -1      ruby/krossruby/CMakeLists.txt  
 M  +1 -1      ruby/ktexteditor/CMakeLists.txt  
 M  +1 -1      ruby/nepomuk/CMakeLists.txt  
 M  +1 -1      ruby/okular/CMakeLists.txt  
 M  +1 -1      ruby/phonon/CMakeLists.txt  
 M  +1 -1      ruby/plasma/examples/applets/digital-clock/CMakeLists.txt  
 M  +1 -1      ruby/plasma/src/CMakeLists.txt  
 M  +1 -1      ruby/qscintilla/CMakeLists.txt  
 M  +1 -1      ruby/qtruby/src/CMakeLists.txt  
 M  +1 -1      ruby/qtscript/CMakeLists.txt  
 M  +1 -1      ruby/qttest/CMakeLists.txt  
 M  +1 -1      ruby/qtuitools/CMakeLists.txt  
 M  +1 -1      ruby/qtwebkit/CMakeLists.txt  
 M  +1 -1      ruby/qwt/CMakeLists.txt  
 M  +1 -1      ruby/solid/CMakeLists.txt  
 M  +1 -1      ruby/soprano/CMakeLists.txt  


--- trunk/KDE/kdebindings/ruby/CMakeLists.txt #1096209:1096210
@@ -1,4 +1,4 @@
-macro_optional_find_package(RUBY)
+macro_optional_find_package(Ruby)
 
 #####################################################################
 # QtRuby/Korundum
@@ -47,14 +47,8 @@
 set(SOLID_ENABLED "no")
 set(PLASMA_ENABLED "no")
 
-if(RUBY_EXECUTABLE AND RUBY_LIBRARY AND RUBY_INCLUDE_PATH)
-   EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -e "print RUBY_VERSION"
-      OUTPUT_VARIABLE RUBY_VERSION)
+if(RUBY_EXECUTABLE AND RUBY_LIBRARY AND RUBY_INCLUDE_DIRS)
 
-    STRING(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" RUBY_VERSION_MAJOR "${RUBY_VERSION}")
-    STRING(REGEX REPLACE "^[0-9]+\\.([0-9])+\\.[0-9]+.*" "\\1" RUBY_VERSION_MINOR "${RUBY_VERSION}")
-    STRING(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" RUBY_VERSION_PATCH "${RUBY_VERSION}")
-
     # compute an overall version number which can be compared at once
     MATH(EXPR RUBY_VERSION_NUMBER "${RUBY_VERSION_MAJOR}*10000 + ${RUBY_VERSION_MINOR}*100 + ${RUBY_VERSION_PATCH}")
 
@@ -140,7 +134,7 @@
         add_subdirectory( solid )
         set(SOLID_ENABLED "yes")
     endif(ENABLE_SOLID_RUBY)
-endif(RUBY_EXECUTABLE AND RUBY_LIBRARY AND RUBY_INCLUDE_PATH)
+endif(RUBY_EXECUTABLE AND RUBY_LIBRARY AND RUBY_INCLUDE_DIRS)
 
 message(STATUS "Build QtRuby... " ${QTRUBY_ENABLED})
 message(STATUS "Build QtWebKit Ruby... " ${QTWEBKIT_ENABLED})
@@ -171,11 +165,11 @@
 
 set(KROSSRUBY_ENABLED "no")
 if(ENABLE_KROSSRUBY)
-    if (RUBY_EXECUTABLE AND RUBY_LIBRARY AND RUBY_INCLUDE_PATH)
+    if (RUBY_EXECUTABLE AND RUBY_LIBRARY AND RUBY_INCLUDE_DIRS)
         EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r mkmf -e "exit(have_func('rb_hash_foreach') ? 0 : 1)" RESULT_VARIABLE RUBY_HASH_FOREACH OUTPUT_QUIET)
         if (RUBY_HASH_FOREACH EQUAL 0)
 
-            set(CMAKE_REQUIRED_INCLUDES ${RUBY_INCLUDE_PATH})
+            set(CMAKE_REQUIRED_INCLUDES ${RUBY_INCLUDE_DIRS})
             set(CMAKE_REQUIRED_LIBRARIES ${RUBY_LIBRARY})
             CHECK_CXX_SOURCE_COMPILES("
                 #include <ruby.h>
@@ -199,9 +193,9 @@
             #endif (${RUBY_HASH_FOREACH} EQUAL 0)
 
         endif (RUBY_HASH_FOREACH EQUAL 0)
-    endif (RUBY_EXECUTABLE AND RUBY_LIBRARY AND RUBY_INCLUDE_PATH)
+    endif (RUBY_EXECUTABLE AND RUBY_LIBRARY AND RUBY_INCLUDE_DIRS)
     message(STATUS "Ruby Executable: " ${RUBY_EXECUTABLE})
     message(STATUS "Ruby Libraries: " ${RUBY_LIBRARY})
-    message(STATUS "Ruby Include Path: " ${RUBY_INCLUDE_PATH})
+    message(STATUS "Ruby Include Directories: " ${RUBY_INCLUDE_DIRS})
 endif(ENABLE_KROSSRUBY)
 message(STATUS "Build Kross Ruby... " ${KROSSRUBY_ENABLED})
--- trunk/KDE/kdebindings/ruby/akonadi/CMakeLists.txt #1096209:1096210
@@ -1,4 +1,4 @@
-include_directories( ${CMAKE_SOURCE_DIR}/smoke ${RUBY_INCLUDE_PATH} ${CMAKE_SOURCE_DIR}/ruby/qtruby/src)
+include_directories( ${CMAKE_SOURCE_DIR}/smoke ${RUBY_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/ruby/qtruby/src)
 INCLUDE_DIRECTORIES (${QT_INCLUDES} ${KDE4_INCLUDE_DIR})
 include_directories( ${KDE4_INCLUDE_DIR}/akonadi )
 
--- trunk/KDE/kdebindings/ruby/kdevplatform/CMakeLists.txt #1096209:1096210
@@ -1,6 +1,6 @@
 find_package(KDevPlatform REQUIRED)
 
-include_directories( ${CMAKE_SOURCE_DIR}/smoke ${RUBY_INCLUDE_PATH} ${CMAKE_SOURCE_DIR}/ruby/qtruby/src )
+include_directories( ${CMAKE_SOURCE_DIR}/smoke ${RUBY_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/ruby/qtruby/src )
 INCLUDE_DIRECTORIES ( ${QT_INCLUDES}
     ${KDE4_INCLUDE_DIR}/threadweaver
     ${KDEVPLATFORM_INCLUDE_DIR}/interfaces
--- trunk/KDE/kdebindings/ruby/khtml/CMakeLists.txt #1096209:1096210
@@ -1,4 +1,4 @@
-include_directories( ${CMAKE_SOURCE_DIR}/smoke ${RUBY_INCLUDE_PATH} ${CMAKE_SOURCE_DIR}/ruby/qtruby/src)
+include_directories( ${CMAKE_SOURCE_DIR}/smoke ${RUBY_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/ruby/qtruby/src)
 
 set(rubykhtml_LIBRARY_SRC khtml.cpp khtmlhandlers.cpp)
 add_library(rubykhtml MODULE ${rubykhtml_LIBRARY_SRC})
--- trunk/KDE/kdebindings/ruby/kio/CMakeLists.txt #1096209:1096210
@@ -1,4 +1,4 @@
-include_directories( ${CMAKE_SOURCE_DIR}/smoke ${RUBY_INCLUDE_PATH} ${CMAKE_SOURCE_DIR}/ruby/qtruby/src)
+include_directories( ${CMAKE_SOURCE_DIR}/smoke ${RUBY_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/ruby/qtruby/src)
 
 set(rubykio_LIBRARY_SRC kio.cpp kiohandlers.cpp)
 add_library(rubykio MODULE ${rubykio_LIBRARY_SRC})
--- trunk/KDE/kdebindings/ruby/korundum/examples/dbpedia_references/CMakeLists.txt #1096209:1096210
@@ -1,5 +1,5 @@
 FIND_PACKAGE (RUBY REQUIRED)
 
-include_directories( ${RUBY_INCLUDE_PATH} )
+include_directories( ${RUBY_INCLUDE_DIRS} )
 install(FILES dbpedia_references.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
 install(FILES dbpedia_references.rb DESTINATION ${DATA_INSTALL_DIR}/dbpedia_references)
--- trunk/KDE/kdebindings/ruby/korundum/src/CMakeLists.txt #1096209:1096210
@@ -9,7 +9,7 @@
     ADD_DEFINITIONS (-DRUBY_VERSION=0x${RUBY_VERSION_NUMBER})
 ENDIF(RUBY_VERSION)
 
-include_directories( ${CMAKE_SOURCE_DIR}/smoke ${RUBY_INCLUDE_PATH} ${CMAKE_SOURCE_DIR}/ruby/qtruby/src ${KDE4_INCLUDE_DIR} ${QT_INCLUDES}  )
+include_directories( ${CMAKE_SOURCE_DIR}/smoke ${RUBY_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/ruby/qtruby/src ${KDE4_INCLUDE_DIR} ${QT_INCLUDES}  )
 
 set(korundum_LIB_SRCS 
    Korundum.cpp 
--- trunk/KDE/kdebindings/ruby/krossruby/CMakeLists.txt #1096209:1096210
@@ -1,4 +1,4 @@
-include_directories( ${RUBY_INCLUDE_PATH} )
+include_directories( ${RUBY_INCLUDE_DIRS} )
 
 set(krossruby_PART_SRCS
    rubyvariant.cpp
--- trunk/KDE/kdebindings/ruby/ktexteditor/CMakeLists.txt #1096209:1096210
@@ -1,4 +1,4 @@
-include_directories( ${CMAKE_SOURCE_DIR}/smoke ${RUBY_INCLUDE_PATH} ${CMAKE_SOURCE_DIR}/ruby/qtruby/src)
+include_directories( ${CMAKE_SOURCE_DIR}/smoke ${RUBY_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/ruby/qtruby/src)
 INCLUDE_DIRECTORIES (${QT_INCLUDES})
 
 set(rubyktexteditor_LIBRARY_SRC ktexteditor.cpp ktexteditorhandlers.cpp)
--- trunk/KDE/kdebindings/ruby/nepomuk/CMakeLists.txt #1096209:1096210
@@ -1,4 +1,4 @@
-include_directories( ${CMAKE_SOURCE_DIR}/smoke ${RUBY_INCLUDE_PATH} ${CMAKE_SOURCE_DIR}/ruby/qtruby/src)
+include_directories( ${CMAKE_SOURCE_DIR}/smoke ${RUBY_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/ruby/qtruby/src)
 INCLUDE_DIRECTORIES (${QT_INCLUDES})
 
 set(rubynepomuk_LIBRARY_SRC nepomuk.cpp nepomukhandlers.cpp)
--- trunk/KDE/kdebindings/ruby/okular/CMakeLists.txt #1096209:1096210
@@ -1,4 +1,4 @@
-include_directories( ${CMAKE_SOURCE_DIR}/smoke ${RUBY_INCLUDE_PATH} ${CMAKE_SOURCE_DIR}/ruby/qtruby/src)
+include_directories( ${CMAKE_SOURCE_DIR}/smoke ${RUBY_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/ruby/qtruby/src)
 INCLUDE_DIRECTORIES (${QT_INCLUDES})
 
 set(rubyokular_LIBRARY_SRC okular.cpp okularhandlers.cpp)
--- trunk/KDE/kdebindings/ruby/phonon/CMakeLists.txt #1096209:1096210
@@ -1,4 +1,4 @@
-include_directories( ${CMAKE_SOURCE_DIR}/smoke ${RUBY_INCLUDE_PATH} ${CMAKE_SOURCE_DIR}/ruby/qtruby/src)
+include_directories( ${CMAKE_SOURCE_DIR}/smoke ${RUBY_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/ruby/qtruby/src)
 
 set(rubyphonon_LIBRARY_SRC phonon.cpp phononhandlers.cpp)
 add_library(rubyphonon MODULE ${rubyphonon_LIBRARY_SRC})
--- trunk/KDE/kdebindings/ruby/plasma/examples/applets/digital-clock/CMakeLists.txt #1096209:1096210
@@ -9,7 +9,7 @@
 	ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/calendar.rb COMMAND ${RBUIC4} ${UI_CALENDAR} -o ${CMAKE_CURRENT_BINARY_DIR}/calendar.rb COMMENT "Generating calendar.rb")
 	ADD_CUSTOM_TARGET(calendar ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/calendar.rb)
 
-	include_directories( ${RUBY_INCLUDE_PATH} )
+	include_directories( ${RUBY_INCLUDE_DIRS} )
 
 	install(FILES plasma-ruby-digital-clock-default.desktop DESTINATION ${SERVICES_INSTALL_DIR})
 
--- trunk/KDE/kdebindings/ruby/plasma/src/CMakeLists.txt #1096209:1096210
@@ -1,6 +1,6 @@
 add_subdirectory( lib )
 
-include_directories( ${CMAKE_SOURCE_DIR}/smoke ${RUBY_INCLUDE_PATH} ${CMAKE_SOURCE_DIR}/ruby/qtruby/src)
+include_directories( ${CMAKE_SOURCE_DIR}/smoke ${RUBY_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/ruby/qtruby/src)
 INCLUDE_DIRECTORIES (${QT_INCLUDES})
 
 set(plasma_applet_LIB_SRCS 
--- trunk/KDE/kdebindings/ruby/qscintilla/CMakeLists.txt #1096209:1096210
@@ -1,4 +1,4 @@
-include_directories( ${CMAKE_SOURCE_DIR}/smoke ${RUBY_INCLUDE_PATH} ${CMAKE_SOURCE_DIR}/ruby/qtruby/src)
+include_directories( ${CMAKE_SOURCE_DIR}/smoke ${RUBY_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/ruby/qtruby/src)
 INCLUDE_DIRECTORIES (${QT_INCLUDES})
 
 set(rubyqsci_LIBRARY_SRC qscintilla.cpp qscintillahandlers.cpp)
--- trunk/KDE/kdebindings/ruby/qtruby/src/CMakeLists.txt #1096209:1096210
@@ -13,7 +13,7 @@
     ADD_DEFINITIONS (-DRUBY_VERSION=0x${RUBY_VERSION_NUMBER})
 ENDIF(RUBY_VERSION)
 
-include_directories( ${CMAKE_SOURCE_DIR}/smoke ${RUBY_INCLUDE_PATH} )
+include_directories( ${CMAKE_SOURCE_DIR}/smoke ${RUBY_INCLUDE_DIRS} )
 INCLUDE_DIRECTORIES (${QT_INCLUDES})
 
 
--- trunk/KDE/kdebindings/ruby/qtscript/CMakeLists.txt #1096209:1096210
@@ -1,4 +1,4 @@
-include_directories( ${CMAKE_SOURCE_DIR}/smoke ${RUBY_INCLUDE_PATH} ${CMAKE_SOURCE_DIR}/ruby/qtruby/src)
+include_directories( ${CMAKE_SOURCE_DIR}/smoke ${RUBY_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/ruby/qtruby/src)
 INCLUDE_DIRECTORIES (${QT_INCLUDES} ${KDE4_INCLUDE_DIR})
 
 set(qtscript_LIBRARY_SRC qtscript.cpp qtscripthandlers.cpp)
--- trunk/KDE/kdebindings/ruby/qttest/CMakeLists.txt #1096209:1096210
@@ -1,4 +1,4 @@
-include_directories( ${CMAKE_SOURCE_DIR}/smoke ${RUBY_INCLUDE_PATH} ${CMAKE_SOURCE_DIR}/ruby/qtruby/src)
+include_directories( ${CMAKE_SOURCE_DIR}/smoke ${RUBY_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/ruby/qtruby/src)
 INCLUDE_DIRECTORIES (${QT_INCLUDES} ${KDE4_INCLUDE_DIR})
 
 set(qttest_LIBRARY_SRC qttest.cpp qttesthandlers.cpp)
--- trunk/KDE/kdebindings/ruby/qtuitools/CMakeLists.txt #1096209:1096210
@@ -1,4 +1,4 @@
-include_directories( ${CMAKE_SOURCE_DIR}/smoke ${RUBY_INCLUDE_PATH} ${CMAKE_SOURCE_DIR}/ruby/qtruby/src)
+include_directories( ${CMAKE_SOURCE_DIR}/smoke ${RUBY_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/ruby/qtruby/src)
 INCLUDE_DIRECTORIES (${QT_INCLUDES})
 
 set(rubyqtuitools_LIBRARY_SRC qtuitools.cpp qtuitoolshandlers.cpp)
--- trunk/KDE/kdebindings/ruby/qtwebkit/CMakeLists.txt #1096209:1096210
@@ -1,4 +1,4 @@
-include_directories( ${CMAKE_SOURCE_DIR}/smoke ${RUBY_INCLUDE_PATH} ${CMAKE_SOURCE_DIR}/ruby/qtruby/src)
+include_directories( ${CMAKE_SOURCE_DIR}/smoke ${RUBY_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/ruby/qtruby/src)
 INCLUDE_DIRECTORIES (${QT_INCLUDES})
 
 set(rubyqtwebkit_LIBRARY_SRC qtwebkit.cpp qtwebkithandlers.cpp)
--- trunk/KDE/kdebindings/ruby/qwt/CMakeLists.txt #1096209:1096210
@@ -1,6 +1,6 @@
 find_package(Qwt5 REQUIRED)
 
-include_directories( ${CMAKE_SOURCE_DIR}/smoke ${RUBY_INCLUDE_PATH} ${CMAKE_SOURCE_DIR}/ruby/qtruby/src)
+include_directories( ${CMAKE_SOURCE_DIR}/smoke ${RUBY_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/ruby/qtruby/src)
 INCLUDE_DIRECTORIES (${QT_INCLUDES} ${Qwt5_INCLUDE_DIR} )
 
 set(rubyqwt_LIBRARY_SRC qwt.cpp qwthandlers.cpp)
--- trunk/KDE/kdebindings/ruby/solid/CMakeLists.txt #1096209:1096210
@@ -1,4 +1,4 @@
-include_directories( ${CMAKE_SOURCE_DIR}/smoke ${RUBY_INCLUDE_PATH} ${CMAKE_SOURCE_DIR}/ruby/qtruby/src)
+include_directories( ${CMAKE_SOURCE_DIR}/smoke ${RUBY_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/ruby/qtruby/src)
 INCLUDE_DIRECTORIES (${QT_INCLUDES} ${KDE4_INCLUDE_DIR})
 
 set(rubysolid_LIBRARY_SRC solid.cpp solidhandlers.cpp)
--- trunk/KDE/kdebindings/ruby/soprano/CMakeLists.txt #1096209:1096210
@@ -1,4 +1,4 @@
-include_directories( ${CMAKE_SOURCE_DIR}/smoke ${RUBY_INCLUDE_PATH} ${CMAKE_SOURCE_DIR}/ruby/qtruby/src)
+include_directories( ${CMAKE_SOURCE_DIR}/smoke ${RUBY_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/ruby/qtruby/src)
 INCLUDE_DIRECTORIES (${QT_INCLUDES})
 
 set(rubysoprano_LIBRARY_SRC soprano.cpp sopranohandlers.cpp)


More information about the Kde-buildsystem mailing list