From 13b769c326f2087c87cdb78ab2fae47ec17e4b18 Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Tue, 30 May 2006 09:02:38 +0000 Subject: Move cmake duplicate check here: -> FindTagLib: need by kdemultimedia/amarok -> FindPostgreSQL: need by koffice-kexi/amarok -> FindMySQL: need by koffice-kexi/amarok -> FindMusicBrainz: need by amarok/kdemultimedia -> FindUSB: need by kdebase/amarok -> FindBerkeleyDB: need by kbabel/kdevelop -> FindRUBY: need by koffice-kross/amarok I will remove them from kde module after new snapshot (next monday) svn path=/trunk/KDE/kdelibs/; revision=546487 --- modules/FindRUBY.cmake | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 modules/FindRUBY.cmake (limited to 'modules/FindRUBY.cmake') diff --git a/modules/FindRUBY.cmake b/modules/FindRUBY.cmake new file mode 100644 index 00000000..8bcfb357 --- /dev/null +++ b/modules/FindRUBY.cmake @@ -0,0 +1,43 @@ +# - Find ruby +# This module finds if RUBY is installed and determines where the include files +# and libraries are. It also determines what the name of the library is. This +# code sets the following variables: +# +# RUBY_INCLUDE_PATH = path to where ruby.h can be found +# RUBY_EXECUTABLE = full path to the ruby binary +# + +if(RUBY_LIBRARY AND RUBY_INCLUDE_PATH) + # Already in cache, be silent + set(RUBY_FIND_QUIETLY TRUE) +endif (RUBY_LIBRARY AND RUBY_INCLUDE_PATH) + +SET(RUBY_POSSIBLE_INCLUDE_PATHS + /usr/lib/ruby/1.8/i586-linux-gnu/ + ) + +SET(RUBY_POSSIBLE_LIB_PATHS + /usr/lib + ) + +FIND_PATH(RUBY_INCLUDE_PATH ruby.h + ${RUBY_POSSIBLE_INCLUDE_PATHS}) + +FIND_LIBRARY(RUBY_LIBRARY + NAMES ruby + PATHS ${RUBY_POSSIBLE_LIB_PATHS} + ) + +FIND_PROGRAM(RUBY_EXECUTABLE + NAMES ruby + PATHS + /usr/bin + /usr/local/bin +) + +MARK_AS_ADVANCED( + RUBY_EXECUTABLE + RUBY_LIBRARY + RUBY_INCLUDE_PATH + ) + -- cgit v1.2.1 From c778596920e0d5357f216c885e35b4f97d371a23 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Sat, 9 Sep 2006 10:18:35 +0000 Subject: added copyright notice everywhere. Now they all are BSD-licensed, as copyright holder I inserted everywhere the one who added it to svn (or Kitware if it is an enhanced copy from taken cmake) Some developers committed quite often but were not the ones who added the file, if you feel you have also copyright on the file add your name in the specific file. Copyright holders: CCMAIL: montel@kde.org CCMAIL: toscano.pino@tiscali.it CCMAIL: adymo@kdevelop.org CCMAIL: ranger@befunk.com CCMAIL: zack@kde.org CCMAIL: caslav.ilic@gmx.net CCMAIL: syntheticpp@yahoo.com CCMAIL: js@iidea.pl CCMAIL: michael.larouche@kdemail.net CCMAIL: ossi@kde.org CCMAIL: faure@kde.org Committers, but no files added so that they are not listed as copyright holders: CCMAIL: ch.ehrlicher@gmx.de CCMAIL: winter@kde.org CCMAIL: ralf.habacker@freenet.de CCMAIL: moura@kdewebdev.org CCMAIL: kde-buildsystem@kde.org Alex svn path=/trunk/KDE/kdelibs/; revision=582410 --- modules/FindRUBY.cmake | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'modules/FindRUBY.cmake') diff --git a/modules/FindRUBY.cmake b/modules/FindRUBY.cmake index 8bcfb357..4510660b 100644 --- a/modules/FindRUBY.cmake +++ b/modules/FindRUBY.cmake @@ -1,11 +1,16 @@ -# - Find ruby -# This module finds if RUBY is installed and determines where the include files +# - Find Ruby +# This module finds if Ruby is installed and determines where the include files # and libraries are. It also determines what the name of the library is. This # code sets the following variables: # # RUBY_INCLUDE_PATH = path to where ruby.h can be found # RUBY_EXECUTABLE = full path to the ruby binary # +# Copyright (c) 2006, Laurent Montel, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + if(RUBY_LIBRARY AND RUBY_INCLUDE_PATH) # Already in cache, be silent -- cgit v1.2.1 From 45ed760862b295694ff9ef111513be68f4a4b535 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Wed, 13 Sep 2006 21:27:51 +0000 Subject: -apply a patch from flameeyes at gentoo dot org , which asks ruby for the location of its lib and headers Alex CCMAIL: montel@kde.org Laurent: where is this actually used ? svn path=/trunk/KDE/kdelibs/; revision=583963 --- modules/FindRUBY.cmake | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) (limited to 'modules/FindRUBY.cmake') diff --git a/modules/FindRUBY.cmake b/modules/FindRUBY.cmake index 4510660b..6ac3c291 100644 --- a/modules/FindRUBY.cmake +++ b/modules/FindRUBY.cmake @@ -13,36 +13,37 @@ if(RUBY_LIBRARY AND RUBY_INCLUDE_PATH) - # Already in cache, be silent - set(RUBY_FIND_QUIETLY TRUE) + # Already in cache, be silent + set(RUBY_FIND_QUIETLY TRUE) endif (RUBY_LIBRARY AND RUBY_INCLUDE_PATH) -SET(RUBY_POSSIBLE_INCLUDE_PATHS - /usr/lib/ruby/1.8/i586-linux-gnu/ - ) +# RUBY_ARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"archdir"@:>@)'` +# RUBY_SITEARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"sitearchdir"@:>@)'` +# RUBY_SITEDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"sitelibdir"@:>@)'` +# RUBY_LIBDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"libdir"@:>@)'` +# RUBY_LIBRUBYARG=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"LIBRUBYARG_SHARED"@:>@)'` -SET(RUBY_POSSIBLE_LIB_PATHS - /usr/lib - ) +FIND_PROGRAM(RUBY_EXECUTABLE NAMES ruby ruby1.8 ruby18 ) + +EXEC_PROGRAM(${RUBY_EXECUTABLE} ARGS -r rbconfig -e 'puts Config::CONFIG[\"archdir\"]' + OUTPUT_VARIABLE RUBY_ARCH_DIR) + +EXEC_PROGRAM(${RUBY_EXECUTABLE} ARGS -r rbconfig -e 'puts Config::CONFIG["libdir"]' + OUTPUT_VARIABLE RUBY_POSSIBLE_LIB_PATH) -FIND_PATH(RUBY_INCLUDE_PATH ruby.h - ${RUBY_POSSIBLE_INCLUDE_PATHS}) +FIND_PATH(RUBY_INCLUDE_PATH + NAMES ruby.h + PATHS + ${RUBY_ARCH_DIR} + /usr/lib/ruby/1.8/i586-linux-gnu/ ) FIND_LIBRARY(RUBY_LIBRARY NAMES ruby - PATHS ${RUBY_POSSIBLE_LIB_PATHS} + PATHS ${RUBY_POSSIBLE_LIB_PATH} ) -FIND_PROGRAM(RUBY_EXECUTABLE - NAMES ruby - PATHS - /usr/bin - /usr/local/bin -) - MARK_AS_ADVANCED( RUBY_EXECUTABLE RUBY_LIBRARY RUBY_INCLUDE_PATH ) - -- cgit v1.2.1 From 4b4b7758ca3bac85fcbe8722cbd028fd78b26cca Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Fri, 15 Sep 2006 22:01:43 +0000 Subject: -use EXECUTE_PROCESS() instead of EXEC_PROGRAM() -also check for rubylibdir Alex CCMAIL: ewilligh@uni-koeln.de svn path=/trunk/KDE/kdelibs/; revision=584954 --- modules/FindRUBY.cmake | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'modules/FindRUBY.cmake') diff --git a/modules/FindRUBY.cmake b/modules/FindRUBY.cmake index 6ac3c291..af720772 100644 --- a/modules/FindRUBY.cmake +++ b/modules/FindRUBY.cmake @@ -25,12 +25,22 @@ endif (RUBY_LIBRARY AND RUBY_INCLUDE_PATH) FIND_PROGRAM(RUBY_EXECUTABLE NAMES ruby ruby1.8 ruby18 ) -EXEC_PROGRAM(${RUBY_EXECUTABLE} ARGS -r rbconfig -e 'puts Config::CONFIG[\"archdir\"]' +EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts Config::CONFIG['archdir']" OUTPUT_VARIABLE RUBY_ARCH_DIR) -EXEC_PROGRAM(${RUBY_EXECUTABLE} ARGS -r rbconfig -e 'puts Config::CONFIG["libdir"]' + +EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts Config::CONFIG['libdir']" OUTPUT_VARIABLE RUBY_POSSIBLE_LIB_PATH) +EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts Config::CONFIG['rubylibdir']" + OUTPUT_VARIABLE RUBY_RUBY_LIB_PATH) + +# remove the new lines from the output by replacing them with empty strings +STRING(REPLACE "\n" "" RUBY_ARCH_DIR "${RUBY_ARCH_DIR}") +STRING(REPLACE "\n" "" RUBY_POSSIBLE_LIB_PATH "${RUBY_POSSIBLE_LIB_PATH}") +STRING(REPLACE "\n" "" RUBY_RUBY_LIB_PATH "${RUBY_RUBY_LIB_PATH}") + + FIND_PATH(RUBY_INCLUDE_PATH NAMES ruby.h PATHS -- cgit v1.2.1 From 8c826b4040dbb87ff8c1a9394d8e3cbfdbc03d56 Mon Sep 17 00:00:00 2001 From: Sebastian Sauer Date: Tue, 24 Oct 2006 01:02:17 +0000 Subject: * check also for ruby 1.9 * 'archdir' may empty and if that's the case use 'rubyincludedir' * use 'ruby_version' * don't hardcode ruby include-path svn path=/trunk/KDE/kdelibs/; revision=598580 --- modules/FindRUBY.cmake | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'modules/FindRUBY.cmake') diff --git a/modules/FindRUBY.cmake b/modules/FindRUBY.cmake index af720772..93f792d4 100644 --- a/modules/FindRUBY.cmake +++ b/modules/FindRUBY.cmake @@ -23,32 +23,33 @@ endif (RUBY_LIBRARY AND RUBY_INCLUDE_PATH) # 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']" +EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts Config::CONFIG['archdir'] || Config::CONFIG['rubyincludedir']" OUTPUT_VARIABLE RUBY_ARCH_DIR) - EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts Config::CONFIG['libdir']" OUTPUT_VARIABLE RUBY_POSSIBLE_LIB_PATH) EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts Config::CONFIG['rubylibdir']" OUTPUT_VARIABLE RUBY_RUBY_LIB_PATH) +EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts Config::CONFIG['ruby_version']" + OUTPUT_VARIABLE RUBY_VERSION) + # remove the new lines from the output by replacing them with empty strings STRING(REPLACE "\n" "" RUBY_ARCH_DIR "${RUBY_ARCH_DIR}") STRING(REPLACE "\n" "" RUBY_POSSIBLE_LIB_PATH "${RUBY_POSSIBLE_LIB_PATH}") STRING(REPLACE "\n" "" RUBY_RUBY_LIB_PATH "${RUBY_RUBY_LIB_PATH}") - +STRING(REPLACE "\n" "" RUBY_VERSION "${RUBY_VERSION}") FIND_PATH(RUBY_INCLUDE_PATH - NAMES ruby.h - PATHS - ${RUBY_ARCH_DIR} - /usr/lib/ruby/1.8/i586-linux-gnu/ ) + NAMES ruby.h + PATHS ${RUBY_ARCH_DIR} ${RUBY_RUBY_LIB_PATH} + ) FIND_LIBRARY(RUBY_LIBRARY - NAMES ruby + NAMES ruby${RUBY_VERSION} ruby PATHS ${RUBY_POSSIBLE_LIB_PATH} ) -- cgit v1.2.1 From df61e0fdba982d79a5890b93db3d26a9bfc7afc5 Mon Sep 17 00:00:00 2001 From: Sebastian Sauer Date: Tue, 24 Oct 2006 01:08:23 +0000 Subject: better :-/ svn path=/trunk/KDE/kdelibs/; revision=598583 --- modules/FindRUBY.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/FindRUBY.cmake') diff --git a/modules/FindRUBY.cmake b/modules/FindRUBY.cmake index 93f792d4..486916f0 100644 --- a/modules/FindRUBY.cmake +++ b/modules/FindRUBY.cmake @@ -45,12 +45,12 @@ STRING(REPLACE "\n" "" RUBY_VERSION "${RUBY_VERSION}") FIND_PATH(RUBY_INCLUDE_PATH NAMES ruby.h - PATHS ${RUBY_ARCH_DIR} ${RUBY_RUBY_LIB_PATH} + PATHS ${RUBY_ARCH_DIR} ) FIND_LIBRARY(RUBY_LIBRARY NAMES ruby${RUBY_VERSION} ruby - PATHS ${RUBY_POSSIBLE_LIB_PATH} + PATHS ${RUBY_POSSIBLE_LIB_PATH} ${RUBY_RUBY_LIB_PATH} ) MARK_AS_ADVANCED( -- cgit v1.2.1 From f768b27650ff682de37b5a05d19640bf0049382e Mon Sep 17 00:00:00 2001 From: Sebastian Sauer Date: Tue, 24 Oct 2006 01:19:47 +0000 Subject: RUBY_LIBRARY is also set. svn path=/trunk/KDE/kdelibs/; revision=598586 --- modules/FindRUBY.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules/FindRUBY.cmake') diff --git a/modules/FindRUBY.cmake b/modules/FindRUBY.cmake index 486916f0..95da129f 100644 --- a/modules/FindRUBY.cmake +++ b/modules/FindRUBY.cmake @@ -3,8 +3,9 @@ # and libraries are. It also determines what the name of the library is. This # code sets the following variables: # +# RUBY_LIBRARY = full path+file to the ruby library # RUBY_INCLUDE_PATH = path to where ruby.h can be found -# RUBY_EXECUTABLE = full path to the ruby binary +# RUBY_EXECUTABLE = full path+file to the ruby binary # # Copyright (c) 2006, Laurent Montel, # -- cgit v1.2.1 From 0f771f6dba4bdd29954fc91d0d94acc73aa92077 Mon Sep 17 00:00:00 2001 From: Thomas Moenicke Date: Tue, 6 Feb 2007 23:46:47 +0000 Subject: * Added RUBY_SITE_LIB_DIR, RUBY_SITE_ARCH_DIR svn path=/trunk/KDE/kdelibs/; revision=631022 --- modules/FindRUBY.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'modules/FindRUBY.cmake') diff --git a/modules/FindRUBY.cmake b/modules/FindRUBY.cmake index 95da129f..06843a72 100644 --- a/modules/FindRUBY.cmake +++ b/modules/FindRUBY.cmake @@ -38,11 +38,19 @@ EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts Config::CONFIG[' EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts Config::CONFIG['ruby_version']" OUTPUT_VARIABLE RUBY_VERSION) +EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts Config::CONFIG['sitelibdir']" + OUTPUT_VARIABLE RUBY_SITE_LIB_DIR) + +EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts Config::CONFIG['sitearchdir']" + OUTPUT_VARIABLE RUBY_SITE_ARCH_DIR) + # remove the new lines from the output by replacing them with empty strings STRING(REPLACE "\n" "" RUBY_ARCH_DIR "${RUBY_ARCH_DIR}") STRING(REPLACE "\n" "" RUBY_POSSIBLE_LIB_PATH "${RUBY_POSSIBLE_LIB_PATH}") STRING(REPLACE "\n" "" RUBY_RUBY_LIB_PATH "${RUBY_RUBY_LIB_PATH}") STRING(REPLACE "\n" "" RUBY_VERSION "${RUBY_VERSION}") +STRING(REPLACE "\n" "" RUBY_SITE_LIB_DIR "${RUBY_SITE_LIB_DIR}") +STRING(REPLACE "\n" "" RUBY_SITE_ARCH_DIR "${RUBY_SITE_ARCH_DIR}") FIND_PATH(RUBY_INCLUDE_PATH NAMES ruby.h -- cgit v1.2.1 From c1a4be95ad51f3eb110b16fb541d2cc7a5fa2004 Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Thu, 5 Apr 2007 10:05:16 +0000 Subject: Fix ruby when it's required svn path=/trunk/KDE/kdelibs/; revision=650719 --- modules/FindRUBY.cmake | 83 +++++++++++++++++++++++++++++--------------------- 1 file changed, 49 insertions(+), 34 deletions(-) (limited to 'modules/FindRUBY.cmake') diff --git a/modules/FindRUBY.cmake b/modules/FindRUBY.cmake index 06843a72..aa31d053 100644 --- a/modules/FindRUBY.cmake +++ b/modules/FindRUBY.cmake @@ -6,8 +6,9 @@ # RUBY_LIBRARY = full path+file to the ruby library # RUBY_INCLUDE_PATH = path to where ruby.h can be found # RUBY_EXECUTABLE = full path+file to the ruby binary +# RUBY_FOUND = Ruby was found under system. # -# Copyright (c) 2006, Laurent Montel, +# Copyright (c) 2006,2007 Laurent Montel, # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. @@ -15,7 +16,7 @@ if(RUBY_LIBRARY AND RUBY_INCLUDE_PATH) # Already in cache, be silent - set(RUBY_FIND_QUIETLY TRUE) + SET(RUBY_FOUND TRUE) endif (RUBY_LIBRARY AND RUBY_INCLUDE_PATH) # RUBY_ARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"archdir"@:>@)'` @@ -26,44 +27,58 @@ endif (RUBY_LIBRARY AND RUBY_INCLUDE_PATH) FIND_PROGRAM(RUBY_EXECUTABLE NAMES ruby ruby1.8 ruby18 ruby1.9 ruby19) -EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts Config::CONFIG['archdir'] || Config::CONFIG['rubyincludedir']" - OUTPUT_VARIABLE RUBY_ARCH_DIR) +IF(RUBY_EXECUTABLE) + EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts Config::CONFIG['archdir'] || Config::CONFIG['rubyincludedir']" + OUTPUT_VARIABLE RUBY_ARCH_DIR) -EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts Config::CONFIG['libdir']" - OUTPUT_VARIABLE RUBY_POSSIBLE_LIB_PATH) + EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts Config::CONFIG['libdir']" + OUTPUT_VARIABLE RUBY_POSSIBLE_LIB_PATH) -EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts Config::CONFIG['rubylibdir']" - OUTPUT_VARIABLE RUBY_RUBY_LIB_PATH) + EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts Config::CONFIG['rubylibdir']" + OUTPUT_VARIABLE RUBY_RUBY_LIB_PATH) -EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts Config::CONFIG['ruby_version']" - OUTPUT_VARIABLE RUBY_VERSION) + EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts Config::CONFIG['ruby_version']" + OUTPUT_VARIABLE RUBY_VERSION) -EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts Config::CONFIG['sitelibdir']" - OUTPUT_VARIABLE RUBY_SITE_LIB_DIR) + EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts Config::CONFIG['sitelibdir']" + OUTPUT_VARIABLE RUBY_SITE_LIB_DIR) -EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts Config::CONFIG['sitearchdir']" - OUTPUT_VARIABLE RUBY_SITE_ARCH_DIR) + EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts Config::CONFIG['sitearchdir']" + OUTPUT_VARIABLE RUBY_SITE_ARCH_DIR) -# remove the new lines from the output by replacing them with empty strings -STRING(REPLACE "\n" "" RUBY_ARCH_DIR "${RUBY_ARCH_DIR}") -STRING(REPLACE "\n" "" RUBY_POSSIBLE_LIB_PATH "${RUBY_POSSIBLE_LIB_PATH}") -STRING(REPLACE "\n" "" RUBY_RUBY_LIB_PATH "${RUBY_RUBY_LIB_PATH}") -STRING(REPLACE "\n" "" RUBY_VERSION "${RUBY_VERSION}") -STRING(REPLACE "\n" "" RUBY_SITE_LIB_DIR "${RUBY_SITE_LIB_DIR}") -STRING(REPLACE "\n" "" RUBY_SITE_ARCH_DIR "${RUBY_SITE_ARCH_DIR}") + # remove the new lines from the output by replacing them with empty strings + STRING(REPLACE "\n" "" RUBY_ARCH_DIR "${RUBY_ARCH_DIR}") + STRING(REPLACE "\n" "" RUBY_POSSIBLE_LIB_PATH "${RUBY_POSSIBLE_LIB_PATH}") + STRING(REPLACE "\n" "" RUBY_RUBY_LIB_PATH "${RUBY_RUBY_LIB_PATH}") + STRING(REPLACE "\n" "" RUBY_VERSION "${RUBY_VERSION}") + STRING(REPLACE "\n" "" RUBY_SITE_LIB_DIR "${RUBY_SITE_LIB_DIR}") + STRING(REPLACE "\n" "" RUBY_SITE_ARCH_DIR "${RUBY_SITE_ARCH_DIR}") -FIND_PATH(RUBY_INCLUDE_PATH - NAMES ruby.h - PATHS ${RUBY_ARCH_DIR} - ) + FIND_PATH(RUBY_INCLUDE_PATH + NAMES ruby.h + PATHS ${RUBY_ARCH_DIR} + ) + + FIND_LIBRARY(RUBY_LIBRARY + NAMES ruby${RUBY_VERSION} ruby + PATHS ${RUBY_POSSIBLE_LIB_PATH} ${RUBY_RUBY_LIB_PATH} + ) + SET(AKODE_FOUND TRUE) + MARK_AS_ADVANCED( + RUBY_EXECUTABLE + RUBY_LIBRARY + RUBY_INCLUDE_PATH + ) +ENDIF(RUBY_EXECUTABLE) + +IF(RUBY_FOUND) + IF(NOT RUBY_FIND_QUIETLY) + MESSAGE(STATUS "Ruby found: ${RUBY_LIBRARY}") + ENDIF(NOT RUBY_FIND_QUIETLY) +ELSE(RUBY_FOUND) + IF(RUBY_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could not find Ruby") + ENDIF(RUBY_FIND_REQUIRED) +ENDIF(RUBY_FOUND) -FIND_LIBRARY(RUBY_LIBRARY - NAMES ruby${RUBY_VERSION} ruby - PATHS ${RUBY_POSSIBLE_LIB_PATH} ${RUBY_RUBY_LIB_PATH} - ) -MARK_AS_ADVANCED( - RUBY_EXECUTABLE - RUBY_LIBRARY - RUBY_INCLUDE_PATH - ) -- cgit v1.2.1 From 2b64507726a47578b92541fe194b6e694ae78641 Mon Sep 17 00:00:00 2001 From: Ian Monroe Date: Sun, 8 Apr 2007 01:43:29 +0000 Subject: Fix Ruby check CCMAIL:amarok@kde.org svn path=/trunk/KDE/kdelibs/; revision=651511 --- modules/FindRUBY.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'modules/FindRUBY.cmake') diff --git a/modules/FindRUBY.cmake b/modules/FindRUBY.cmake index aa31d053..043446d0 100644 --- a/modules/FindRUBY.cmake +++ b/modules/FindRUBY.cmake @@ -63,7 +63,11 @@ IF(RUBY_EXECUTABLE) NAMES ruby${RUBY_VERSION} ruby PATHS ${RUBY_POSSIBLE_LIB_PATH} ${RUBY_RUBY_LIB_PATH} ) - SET(AKODE_FOUND TRUE) + + if(RUBY_LIBRARY AND RUBY_INCLUDE_PATH) + SET(RUBY_FOUND TRUE) + endif (RUBY_LIBRARY AND RUBY_INCLUDE_PATH) + MARK_AS_ADVANCED( RUBY_EXECUTABLE RUBY_LIBRARY -- cgit v1.2.1 From 7dd313062785f85184b9ba73bbd34ed4549543ec Mon Sep 17 00:00:00 2001 From: Shane King Date: Wed, 21 Nov 2007 13:01:30 +0000 Subject: Fix to allow finding of windows ruby library svn path=/trunk/KDE/kdelibs/; revision=739636 --- modules/FindRUBY.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules/FindRUBY.cmake') diff --git a/modules/FindRUBY.cmake b/modules/FindRUBY.cmake index 043446d0..ee44bae2 100644 --- a/modules/FindRUBY.cmake +++ b/modules/FindRUBY.cmake @@ -51,6 +51,7 @@ IF(RUBY_EXECUTABLE) STRING(REPLACE "\n" "" RUBY_POSSIBLE_LIB_PATH "${RUBY_POSSIBLE_LIB_PATH}") STRING(REPLACE "\n" "" RUBY_RUBY_LIB_PATH "${RUBY_RUBY_LIB_PATH}") STRING(REPLACE "\n" "" RUBY_VERSION "${RUBY_VERSION}") + STRING(REPLACE "." "" RUBY_VERSION_NODOT "${RUBY_VERSION}") STRING(REPLACE "\n" "" RUBY_SITE_LIB_DIR "${RUBY_SITE_LIB_DIR}") STRING(REPLACE "\n" "" RUBY_SITE_ARCH_DIR "${RUBY_SITE_ARCH_DIR}") @@ -60,7 +61,7 @@ IF(RUBY_EXECUTABLE) ) FIND_LIBRARY(RUBY_LIBRARY - NAMES ruby${RUBY_VERSION} ruby + NAMES ruby${RUBY_VERSION} ruby msvcrt-ruby${RUBY_VERSION_NODOT} PATHS ${RUBY_POSSIBLE_LIB_PATH} ${RUBY_RUBY_LIB_PATH} ) -- cgit v1.2.1 From d1d57cb86dc8890ae1995ae993ca2c8b424bd330 Mon Sep 17 00:00:00 2001 From: Marcus Hufgard Date: Mon, 28 Jan 2008 06:20:49 +0000 Subject: standard compiled ruby 1.9.0 has problems with the include dir. Fixed it svn path=/trunk/KDE/kdelibs/; revision=767485 --- modules/FindRUBY.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/FindRUBY.cmake') diff --git a/modules/FindRUBY.cmake b/modules/FindRUBY.cmake index ee44bae2..8696bb49 100644 --- a/modules/FindRUBY.cmake +++ b/modules/FindRUBY.cmake @@ -57,7 +57,7 @@ IF(RUBY_EXECUTABLE) FIND_PATH(RUBY_INCLUDE_PATH NAMES ruby.h - PATHS ${RUBY_ARCH_DIR} + PATHS ${RUBY_ARCH_DIR} /usr/include/ruby-${RUBY_VERSION} ) FIND_LIBRARY(RUBY_LIBRARY -- cgit v1.2.1 From 814455b7ad321c88e730662fda58261087b72e72 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Mon, 18 Feb 2008 19:06:32 +0000 Subject: some improvements to the docs: -some modules were not at all documented, only few are left now -the copyright message doesn't have to be printed for every module in the docs -fix FindKorundom.cmake, it didn't follow the style guide and had typos (e.g. Korumdum_FOUND instead of KORUNDUM_FOUND) Alex (will commit modified FindKDE4Internal.cmake after Christians commit) svn path=/trunk/KDE/kdelibs/; revision=776742 --- modules/FindRUBY.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/FindRUBY.cmake') diff --git a/modules/FindRUBY.cmake b/modules/FindRUBY.cmake index 8696bb49..b5d3c0fd 100644 --- a/modules/FindRUBY.cmake +++ b/modules/FindRUBY.cmake @@ -7,7 +7,7 @@ # RUBY_INCLUDE_PATH = path to where ruby.h can be found # RUBY_EXECUTABLE = full path+file to the ruby binary # RUBY_FOUND = Ruby was found under system. -# + # Copyright (c) 2006,2007 Laurent Montel, # # Redistribution and use is allowed according to the terms of the BSD license. -- cgit v1.2.1