qtbindings 4.6.3.4 → 4.8.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. data/KNOWN_ISSUES.txt +19 -5
  2. data/README.txt +119 -93
  3. data/Rakefile +28 -27
  4. data/examples/desktop/systray/window.rb +43 -47
  5. data/examples/draganddrop/dropsite/dropsitewidget.rb +10 -9
  6. data/examples/mainwindows/mdi/mainwindow.rb +4 -4
  7. data/examples/network/broadcastsender/sender.rb +3 -1
  8. data/examples/qtscribble/scribble.rb +270 -0
  9. data/examples/ruboids/LICENSE.txt +58 -0
  10. data/examples/run_all.rb +1 -0
  11. data/examples/textedit/textedit.rb +150 -0
  12. data/examples/widgets/scribble/scribblearea.rb +19 -19
  13. data/ext/cmake/modules/BasicFindPackageVersion.cmake.in +30 -0
  14. data/ext/cmake/modules/FindLibraryWithDebug.cmake +113 -0
  15. data/ext/cmake/modules/FindPhonon.cmake +71 -0
  16. data/ext/cmake/modules/FindQImageBlitz.cmake +51 -0
  17. data/ext/cmake/modules/FindRuby.cmake +17 -17
  18. data/ext/cmake/modules/MacroOptionalFindPackage.cmake +6 -26
  19. data/ext/cmake/modules/MacroWriteBasicCMakeVersionFile.cmake +22 -0
  20. data/ext/cmake/modules/SmokeConfig.cmake.in +109 -0
  21. data/ext/generator/cmake/BasicFindPackageVersion.cmake.in +30 -0
  22. data/ext/generator/cmake/CMakeLists.txt +24 -0
  23. data/ext/generator/cmake/FindLibraryWithDebug.cmake +113 -0
  24. data/ext/generator/cmake/FindPhonon.cmake +71 -0
  25. data/ext/generator/cmake/FindQImageBlitz.cmake +51 -0
  26. data/ext/generator/cmake/FindQScintilla.cmake +57 -0
  27. data/ext/generator/cmake/FindQwt5.cmake +104 -0
  28. data/ext/generator/cmake/HandleImportedTargetsInCMakeRequiredLibraries.cmake +85 -0
  29. data/ext/generator/cmake/MacroLogFeature.cmake +146 -0
  30. data/ext/generator/cmake/MacroOptionalAddBindings.cmake +47 -0
  31. data/ext/generator/cmake/MacroOptionalFindPackage.cmake +28 -0
  32. data/ext/generator/cmake/MacroWriteBasicCMakeVersionFile.cmake +22 -0
  33. data/ext/generator/cmake/SmokeConfig.cmake.in +109 -0
  34. data/ext/generator/config.h +25 -0
  35. data/ext/generator/generatorpreprocessor.cpp +60 -41
  36. data/ext/generator/generators/dump/CMakeLists.txt +5 -0
  37. data/ext/generator/generators/smoke/CMakeLists.txt +5 -0
  38. data/ext/generator/generators/smoke/globals.h +3 -1
  39. data/ext/generator/generators/smoke/helpers.cpp +21 -2
  40. data/ext/generator/generators/smoke/writeSmokeDataFile.cpp +26 -1
  41. data/ext/generator/main.cpp +5 -1
  42. data/ext/generator/options.cpp +1 -0
  43. data/ext/generator/options.h +1 -0
  44. data/ext/generator/parser/CMakeLists.txt +10 -1
  45. data/ext/generator/parser/parser.cpp +6 -6
  46. data/ext/generator/parser/parser.h +2 -12
  47. data/ext/generator/parser/parsesession.cpp +1 -0
  48. data/ext/generator/parser/rpp/CMakeLists.txt +6 -0
  49. data/ext/generator/parser/rpp/chartools.cpp +3 -3
  50. data/ext/generator/parser/rpp/chartools.h +3 -1
  51. data/ext/generator/parser/rpp/pp-scanner.cpp +2 -1
  52. data/ext/generator/parser/rpp/tests/CMakeLists.txt +4 -0
  53. data/ext/generator/parser/tests/CMakeLists.txt +16 -0
  54. data/ext/generator/smoke.h +557 -0
  55. data/ext/generator/smokegen_string.h +43 -0
  56. data/ext/generator/type.cpp +15 -6
  57. data/ext/generator/type_compiler.cpp +2 -0
  58. data/ext/ruby/qtruby/src/qtruby.cpp +147 -143
  59. data/ext/ruby/qttest/qttesthandlers.cpp +1 -0
  60. data/ext/smoke/qtcore/QtGuess.txt +23 -25
  61. data/ext/smoke/qtcore/smokeconfig.xml +1 -0
  62. data/ext/smoke/qtdbus/smokeconfig.xml +2 -0
  63. data/ext/smoke/qtgui/smokeconfig.xml +14 -4
  64. data/ext/smoke/qthelp/smokeconfig.xml +1 -0
  65. data/ext/smoke/qtmultimedia/smokeconfig.xml +1 -0
  66. data/ext/smoke/qtnetwork/smokeconfig.xml +2 -0
  67. data/ext/smoke/qtopengl/smokeconfig.xml +1 -0
  68. data/ext/smoke/qtsql/smokeconfig.xml +1 -0
  69. data/ext/smoke/qtsvg/smokeconfig.xml +1 -0
  70. data/ext/smoke/qtwebkit/smokeconfig.xml +3 -0
  71. data/extconf.rb +37 -23
  72. data/lib/Qt/qtruby4.rb +4 -4
  73. data/lib/Qt4.rb +1 -1
  74. data/lib/qtbindings_version.rb +2 -2
  75. metadata +50 -40
@@ -37,13 +37,13 @@ class ScribbleArea < Qt::Widget
37
37
  @image = Qt::Image.new
38
38
  @lastPoint = Qt::Point.new
39
39
  end
40
-
40
+
41
41
  def openImage(fileName)
42
42
  loadedImage = Qt::Image.new
43
43
  if !loadedImage.load(fileName)
44
44
  return false
45
45
  end
46
-
46
+
47
47
  newSize = loadedImage.size().expandedTo(size())
48
48
  resizeImage(loadedImage, newSize)
49
49
  @image = loadedImage
@@ -51,11 +51,11 @@ class ScribbleArea < Qt::Widget
51
51
  update()
52
52
  return true
53
53
  end
54
-
54
+
55
55
  def saveImage(fileName, fileFormat)
56
56
  visibleImage = @image
57
57
  resizeImage(visibleImage, size())
58
-
58
+
59
59
  if visibleImage.save(fileName, fileFormat.to_s)
60
60
  @modified = false
61
61
  return true
@@ -63,7 +63,7 @@ class ScribbleArea < Qt::Widget
63
63
  return false
64
64
  end
65
65
  end
66
-
66
+
67
67
  def modified?
68
68
  return @modified
69
69
  end
@@ -75,47 +75,47 @@ class ScribbleArea < Qt::Widget
75
75
  def penColor=(newColor)
76
76
  @myPenColor = newColor
77
77
  end
78
-
78
+
79
79
  def penWidth
80
80
  return @myPenWidth
81
81
  end
82
-
82
+
83
83
  def penWidth=(newWidth)
84
84
  @myPenWidth = newWidth
85
85
  end
86
-
86
+
87
87
  def clearImage()
88
- @image.fill(qRgb(255, 255, 255))
88
+ @image.fill(Qt::Color.new(255,255,255)) #qRgb(255, 255, 255))
89
89
  @modified = true
90
90
  update()
91
91
  end
92
-
92
+
93
93
  def mousePressEvent(event)
94
94
  if event.button() == Qt::LeftButton
95
95
  @lastPoint = event.pos()
96
96
  @scribbling = true
97
97
  end
98
98
  end
99
-
99
+
100
100
  def mouseMoveEvent(event)
101
101
  if (Qt::LeftButton & event.buttons() != 0) && @scribbling
102
102
  drawLineTo(event.pos())
103
103
  end
104
104
  end
105
-
105
+
106
106
  def mouseReleaseEvent(event)
107
107
  if event.button() == Qt::LeftButton && @scribbling
108
108
  drawLineTo(event.pos())
109
109
  @scribbling = false
110
110
  end
111
111
  end
112
-
112
+
113
113
  def paintEvent(event)
114
114
  painter = Qt::Painter.new(self)
115
115
  painter.drawImage(Qt::Point.new(0, 0), @image)
116
116
  painter.end
117
117
  end
118
-
118
+
119
119
  def resizeEvent(event)
120
120
  if width() > @image.width() || height() > @image.height()
121
121
  newWidth = [width() + 128, @image.width()].max
@@ -125,27 +125,27 @@ class ScribbleArea < Qt::Widget
125
125
  end
126
126
  super(event)
127
127
  end
128
-
128
+
129
129
  def drawLineTo(endPoint)
130
130
  painter = Qt::Painter.new(@image)
131
131
  painter.pen = Qt::Pen.new(Qt::Brush.new(@myPenColor), @myPenWidth, Qt::SolidLine, Qt::RoundCap,
132
132
  Qt::RoundJoin)
133
133
  painter.drawLine(@lastPoint, endPoint)
134
134
  @modified = true
135
-
135
+
136
136
  rad = @myPenWidth / 2
137
137
  update(Qt::Rect.new(@lastPoint, endPoint).normalized().adjusted(-rad, -rad, +rad, +rad))
138
138
  @lastPoint = endPoint
139
139
  painter.end
140
140
  end
141
-
141
+
142
142
  def resizeImage(image, newSize)
143
143
  if image.size == newSize
144
144
  return
145
145
  end
146
-
146
+
147
147
  newImage = Qt::Image.new(newSize, Qt::Image::Format_RGB32)
148
- newImage.fill(qRgb(255, 255, 255))
148
+ newImage.fill(Qt::Color.new(255,255,255)) #qRgb(255, 255, 255))
149
149
  painter = Qt::Painter.new(newImage)
150
150
  painter.drawImage(Qt::Point.new(0, 0), image)
151
151
  @image = newImage
@@ -0,0 +1,30 @@
1
+ # This is a very basic file for the new style find_package() search mode,
2
+ # i.e. Config-mode. It is used by MACRO_WRITE_BASIC_CMAKE_VERSION_FILE() from
3
+ # MacroWriteBasicCMakeVersionFile.cmake.
4
+ # In this mode find_package() searches for a <package>Config.cmake
5
+ # file and an associated <package>Version.cmake file, which it loads to check
6
+ # the version number.
7
+ # This file can be used with configure_file() to generate such a file for a project
8
+ # with very basic logic.
9
+ # It sets PACKAGE_VERSION_EXACT if the current version string and the requested
10
+ # version string are exactly the same and it sets PACKAGE_VERSION_COMPATIBLE
11
+ # if the current version is >= requested version.
12
+ # If this is not good enough for your project, you need to write your own
13
+ # improved <package>Version.cmake file.
14
+ # This file requires the following three variables to be set:
15
+ # PROJECT_VERSION_MAJOR
16
+ # PROJECT_VERSION_MINOR
17
+ # PROJECT_VERSION_PATCH
18
+
19
+
20
+ set(PACKAGE_VERSION @PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT_VERSION_PATCH@)
21
+
22
+ if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" )
23
+ set(PACKAGE_VERSION_COMPATIBLE FALSE)
24
+ else("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" )
25
+ set(PACKAGE_VERSION_COMPATIBLE TRUE)
26
+ if( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}")
27
+ set(PACKAGE_VERSION_EXACT TRUE)
28
+ endif( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}")
29
+ endif("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" )
30
+
@@ -0,0 +1,113 @@
1
+ #
2
+ # FIND_LIBRARY_WITH_DEBUG
3
+ # -> enhanced FIND_LIBRARY to allow the search for an
4
+ # optional debug library with a WIN32_DEBUG_POSTFIX similar
5
+ # to CMAKE_DEBUG_POSTFIX when creating a shared lib
6
+ # it has to be the second and third argument
7
+
8
+ # Copyright (c) 2007, Christian Ehrlicher, <ch.ehrlicher@gmx.de>
9
+ # Redistribution and use is allowed according to the terms of the BSD license.
10
+ # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
11
+
12
+ MACRO(FIND_LIBRARY_WITH_DEBUG var_name win32_dbg_postfix_name dgb_postfix libname)
13
+
14
+ IF(NOT "${win32_dbg_postfix_name}" STREQUAL "WIN32_DEBUG_POSTFIX")
15
+
16
+ # no WIN32_DEBUG_POSTFIX -> simply pass all arguments to FIND_LIBRARY
17
+ FIND_LIBRARY(${var_name}
18
+ ${win32_dbg_postfix_name}
19
+ ${dgb_postfix}
20
+ ${libname}
21
+ ${ARGN}
22
+ )
23
+
24
+ ELSE(NOT "${win32_dbg_postfix_name}" STREQUAL "WIN32_DEBUG_POSTFIX")
25
+
26
+ IF(NOT WIN32)
27
+ # on non-win32 we don't need to take care about WIN32_DEBUG_POSTFIX
28
+
29
+ FIND_LIBRARY(${var_name} ${libname} ${ARGN})
30
+
31
+ ELSE(NOT WIN32)
32
+
33
+ # 1. get all possible libnames
34
+ SET(args ${ARGN})
35
+ SET(newargs "")
36
+ SET(libnames_release "")
37
+ SET(libnames_debug "")
38
+
39
+ LIST(LENGTH args listCount)
40
+
41
+ IF("${libname}" STREQUAL "NAMES")
42
+ SET(append_rest 0)
43
+ LIST(APPEND args " ")
44
+
45
+ FOREACH(i RANGE ${listCount})
46
+ LIST(GET args ${i} val)
47
+
48
+ IF(append_rest)
49
+ LIST(APPEND newargs ${val})
50
+ ELSE(append_rest)
51
+ IF("${val}" STREQUAL "PATHS")
52
+ LIST(APPEND newargs ${val})
53
+ SET(append_rest 1)
54
+ ELSE("${val}" STREQUAL "PATHS")
55
+ LIST(APPEND libnames_release "${val}")
56
+ LIST(APPEND libnames_debug "${val}${dgb_postfix}")
57
+ ENDIF("${val}" STREQUAL "PATHS")
58
+ ENDIF(append_rest)
59
+
60
+ ENDFOREACH(i)
61
+
62
+ ELSE("${libname}" STREQUAL "NAMES")
63
+
64
+ # just one name
65
+ LIST(APPEND libnames_release "${libname}")
66
+ LIST(APPEND libnames_debug "${libname}${dgb_postfix}")
67
+
68
+ SET(newargs ${args})
69
+
70
+ ENDIF("${libname}" STREQUAL "NAMES")
71
+
72
+ # search the release lib
73
+ FIND_LIBRARY(${var_name}_RELEASE
74
+ NAMES ${libnames_release}
75
+ ${newargs}
76
+ )
77
+
78
+ # search the debug lib
79
+ FIND_LIBRARY(${var_name}_DEBUG
80
+ NAMES ${libnames_debug}
81
+ ${newargs}
82
+ )
83
+
84
+ IF(${var_name}_RELEASE AND ${var_name}_DEBUG)
85
+
86
+ # both libs found
87
+ SET(${var_name} optimized ${${var_name}_RELEASE}
88
+ debug ${${var_name}_DEBUG})
89
+
90
+ ELSE(${var_name}_RELEASE AND ${var_name}_DEBUG)
91
+
92
+ IF(${var_name}_RELEASE)
93
+
94
+ # only release found
95
+ SET(${var_name} ${${var_name}_RELEASE})
96
+
97
+ ELSE(${var_name}_RELEASE)
98
+
99
+ # only debug (or nothing) found
100
+ SET(${var_name} ${${var_name}_DEBUG})
101
+
102
+ ENDIF(${var_name}_RELEASE)
103
+
104
+ ENDIF(${var_name}_RELEASE AND ${var_name}_DEBUG)
105
+
106
+ MARK_AS_ADVANCED(${var_name}_RELEASE)
107
+ MARK_AS_ADVANCED(${var_name}_DEBUG)
108
+
109
+ ENDIF(NOT WIN32)
110
+
111
+ ENDIF(NOT "${win32_dbg_postfix_name}" STREQUAL "WIN32_DEBUG_POSTFIX")
112
+
113
+ ENDMACRO(FIND_LIBRARY_WITH_DEBUG)
@@ -0,0 +1,71 @@
1
+ # Find libphonon
2
+ # Once done this will define
3
+ #
4
+ # PHONON_FOUND - system has Phonon Library
5
+ # PHONON_INCLUDES - the Phonon include directory
6
+ # PHONON_LIBS - link these to use Phonon
7
+ # PHONON_VERSION - the version of the Phonon Library
8
+
9
+ # Copyright (c) 2008, Matthias Kretz <kretz@kde.org>
10
+ #
11
+ # Redistribution and use is allowed according to the terms of the BSD license.
12
+ # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
13
+
14
+ macro(_phonon_find_version)
15
+ set(_phonon_namespace_header_file "${PHONON_INCLUDE_DIR}/phonon/phononnamespace.h")
16
+ if (APPLE AND EXISTS "${PHONON_INCLUDE_DIR}/Headers/phononnamespace.h")
17
+ set(_phonon_namespace_header_file "${PHONON_INCLUDE_DIR}/Headers/phononnamespace.h")
18
+ endif (APPLE AND EXISTS "${PHONON_INCLUDE_DIR}/Headers/phononnamespace.h")
19
+ file(READ ${_phonon_namespace_header_file} _phonon_header LIMIT 5000 OFFSET 1000)
20
+ string(REGEX MATCH "define PHONON_VERSION_STR \"(4\\.[0-9]+\\.[0-9a-z]+)\"" _phonon_version_match "${_phonon_header}")
21
+ set(PHONON_VERSION "${CMAKE_MATCH_1}")
22
+ message(STATUS "Phonon Version: ${PHONON_VERSION}")
23
+ endmacro(_phonon_find_version)
24
+
25
+ if(PHONON_FOUND)
26
+ # Already found, nothing more to do except figuring out the version
27
+ _phonon_find_version()
28
+ else(PHONON_FOUND)
29
+ if(PHONON_INCLUDE_DIR AND PHONON_LIBRARY)
30
+ set(PHONON_FIND_QUIETLY TRUE)
31
+ endif(PHONON_INCLUDE_DIR AND PHONON_LIBRARY)
32
+
33
+ # As discussed on kde-buildsystem: first look at CMAKE_PREFIX_PATH, then at the suggested PATHS (kde4 install dir)
34
+ find_library(PHONON_LIBRARY NAMES phonon PATHS ${KDE4_LIB_INSTALL_DIR} ${QT_LIBRARY_DIR} NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH)
35
+ # then at the default system locations (CMAKE_SYSTEM_PREFIX_PATH, i.e. /usr etc.)
36
+ find_library(PHONON_LIBRARY NAMES phonon)
37
+
38
+ find_path(PHONON_INCLUDE_DIR NAMES phonon/phonon_export.h PATHS ${KDE4_INCLUDE_INSTALL_DIR} ${QT_INCLUDE_DIR} ${INCLUDE_INSTALL_DIR} ${QT_LIBRARY_DIR} NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH)
39
+ find_path(PHONON_INCLUDE_DIR NAMES phonon/phonon_export.h)
40
+
41
+ if(PHONON_INCLUDE_DIR AND PHONON_LIBRARY)
42
+ set(PHONON_LIBS ${phonon_LIB_DEPENDS} ${PHONON_LIBRARY})
43
+ set(PHONON_INCLUDES ${PHONON_INCLUDE_DIR}/KDE ${PHONON_INCLUDE_DIR})
44
+ set(PHONON_FOUND TRUE)
45
+ _phonon_find_version()
46
+ else(PHONON_INCLUDE_DIR AND PHONON_LIBRARY)
47
+ set(PHONON_FOUND FALSE)
48
+ endif(PHONON_INCLUDE_DIR AND PHONON_LIBRARY)
49
+
50
+ if(PHONON_FOUND)
51
+ if(NOT PHONON_FIND_QUIETLY)
52
+ message(STATUS "Found Phonon: ${PHONON_LIBRARY}")
53
+ message(STATUS "Found Phonon Includes: ${PHONON_INCLUDES}")
54
+ endif(NOT PHONON_FIND_QUIETLY)
55
+ else(PHONON_FOUND)
56
+ if(Phonon_FIND_REQUIRED)
57
+ if(NOT PHONON_INCLUDE_DIR)
58
+ message(STATUS "Phonon includes NOT found!")
59
+ endif(NOT PHONON_INCLUDE_DIR)
60
+ if(NOT PHONON_LIBRARY)
61
+ message(STATUS "Phonon library NOT found!")
62
+ endif(NOT PHONON_LIBRARY)
63
+ message(FATAL_ERROR "Phonon library or includes NOT found!")
64
+ else(Phonon_FIND_REQUIRED)
65
+ message(STATUS "Unable to find Phonon")
66
+ endif(Phonon_FIND_REQUIRED)
67
+ endif(PHONON_FOUND)
68
+
69
+
70
+ mark_as_advanced(PHONON_INCLUDE_DIR PHONON_LIBRARY PHONON_INCLUDES)
71
+ endif(PHONON_FOUND)
@@ -0,0 +1,51 @@
1
+ # - Try to find the qimageblitz lib
2
+ # Once done this will define
3
+ #
4
+ # QIMAGEBLITZ_FOUND - system has qimageblitz lib
5
+ # QIMAGEBLITZ_INCLUDES - the qimageblitz include directory
6
+ # QIMAGEBLITZ_LIBRARIES - The libraries needed to use qimageblitz
7
+
8
+ # Copyright (c) 2006, Montel Laurent, <montel@kde.org>
9
+ # Copyright (c) 2007, Allen Winter, <winter@kde.org>
10
+ # Redistribution and use is allowed according to the terms of the BSD license.
11
+ # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
12
+
13
+ include(FindLibraryWithDebug)
14
+
15
+ if (QIMAGEBLITZ_INCLUDES AND QIMAGEBLITZ_LIBRARIES)
16
+ set(QImageBlitz_FIND_QUIETLY TRUE)
17
+ endif (QIMAGEBLITZ_INCLUDES AND QIMAGEBLITZ_LIBRARIES)
18
+
19
+ if (NOT WIN32)
20
+ # use pkg-config to get the directories and then use these values
21
+ # in the FIND_PATH() and FIND_LIBRARY() calls
22
+ find_package(PkgConfig)
23
+ pkg_check_modules(PC_QIMAGEBLITZ QUIET qimageblitz)
24
+ endif (NOT WIN32)
25
+
26
+ find_path(QIMAGEBLITZ_INCLUDES
27
+ NAMES
28
+ qimageblitz.h
29
+ PATH_SUFFIXES qimageblitz
30
+ HINTS
31
+ $ENV{QIMAGEBLITZDIR}/include
32
+ ${PC_QIMAGEBLITZ_INCLUDEDIR}
33
+ ${KDE4_INCLUDE_DIR}
34
+ ${INCLUDE_INSTALL_DIR}
35
+ )
36
+
37
+ find_library_with_debug(QIMAGEBLITZ_LIBRARIES
38
+ WIN32_DEBUG_POSTFIX d
39
+ qimageblitz
40
+ HINTS
41
+ $ENV{QIMAGEBLITZDIR}/lib
42
+ ${PC_QIMAGEBLITZ_LIBDIR}
43
+ ${KDE4_LIB_DIR}
44
+ ${LIB_INSTALL_DIR}
45
+ )
46
+
47
+ include(FindPackageHandleStandardArgs)
48
+ find_package_handle_standard_args(QImageBlitz DEFAULT_MSG
49
+ QIMAGEBLITZ_INCLUDES QIMAGEBLITZ_LIBRARIES)
50
+
51
+ mark_as_advanced(QIMAGEBLITZ_INCLUDES QIMAGEBLITZ_LIBRARIES)
@@ -27,11 +27,11 @@
27
27
  # (To distributed this file outside of CMake, substitute the full
28
28
  # License text for the above reference.)
29
29
 
30
- # RUBY_ARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"archdir"@:>@)'`
31
- # RUBY_SITEARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"sitearchdir"@:>@)'`
32
- # RUBY_SITEDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"sitelibdir"@:>@)'`
33
- # RUBY_LIBDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"libdir"@:>@)'`
34
- # RUBY_LIBRUBYARG=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"LIBRUBYARG_SHARED"@:>@)'`
30
+ # RUBY_ARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"archdir"@:>@)'`
31
+ # RUBY_SITEARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"sitearchdir"@:>@)'`
32
+ # RUBY_SITEDIR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"sitelibdir"@:>@)'`
33
+ # RUBY_LIBDIR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"libdir"@:>@)'`
34
+ # RUBY_LIBRUBYARG=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"LIBRUBYARG_SHARED"@:>@)'`
35
35
 
36
36
  # uncomment the following line to get debug output for this file
37
37
  SET(_RUBY_DEBUG_OUTPUT TRUE)
@@ -62,36 +62,36 @@ FIND_PROGRAM(RUBY_EXECUTABLE NAMES ${_RUBY_POSSIBLE_EXECUTABLE_NAMES})
62
62
 
63
63
  IF(RUBY_EXECUTABLE AND NOT RUBY_MAJOR_VERSION)
64
64
  # query the ruby version
65
- EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print Config::CONFIG['MAJOR']"
65
+ EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['MAJOR']"
66
66
  OUTPUT_VARIABLE RUBY_VERSION_MAJOR)
67
67
 
68
- EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print Config::CONFIG['MINOR']"
68
+ EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['MINOR']"
69
69
  OUTPUT_VARIABLE RUBY_VERSION_MINOR)
70
70
 
71
- EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print Config::CONFIG['TEENY']"
71
+ EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['TEENY']"
72
72
  OUTPUT_VARIABLE RUBY_VERSION_PATCH)
73
73
 
74
74
  # query the different directories
75
- EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print Config::CONFIG['archdir']"
75
+ EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['archdir']"
76
76
  OUTPUT_VARIABLE RUBY_ARCH_DIR)
77
77
 
78
- EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print Config::CONFIG['arch']"
78
+ EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['arch']"
79
79
  OUTPUT_VARIABLE RUBY_ARCH)
80
80
 
81
- EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print Config::CONFIG['rubyhdrdir']"
81
+ EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['rubyhdrdir']"
82
82
  OUTPUT_VARIABLE RUBY_HDR_DIR)
83
83
 
84
- EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print Config::CONFIG['libdir']"
84
+ EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['libdir']"
85
85
  OUTPUT_VARIABLE RUBY_POSSIBLE_LIB_DIR)
86
86
 
87
- EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print Config::CONFIG['rubylibdir']"
87
+ EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['rubylibdir']"
88
88
  OUTPUT_VARIABLE RUBY_RUBY_LIB_DIR)
89
89
 
90
90
  # site_ruby
91
- EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print Config::CONFIG['sitearchdir']"
91
+ EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['sitearchdir']"
92
92
  OUTPUT_VARIABLE RUBY_SITEARCH_DIR)
93
93
 
94
- EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print Config::CONFIG['sitelibdir']"
94
+ EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['sitelibdir']"
95
95
  OUTPUT_VARIABLE RUBY_SITELIB_DIR)
96
96
 
97
97
  # vendor_ruby available ?
@@ -99,10 +99,10 @@ IF(RUBY_EXECUTABLE AND NOT RUBY_MAJOR_VERSION)
99
99
  OUTPUT_VARIABLE RUBY_HAS_VENDOR_RUBY ERROR_QUIET)
100
100
 
101
101
  IF(RUBY_HAS_VENDOR_RUBY)
102
- EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print Config::CONFIG['vendorlibdir']"
102
+ EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['vendorlibdir']"
103
103
  OUTPUT_VARIABLE RUBY_VENDORLIB_DIR)
104
104
 
105
- EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print Config::CONFIG['vendorarchdir']"
105
+ EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['vendorarchdir']"
106
106
  OUTPUT_VARIABLE RUBY_VENDORARCH_DIR)
107
107
  ENDIF(RUBY_HAS_VENDOR_RUBY)
108
108