ropencv 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.gitignore CHANGED
@@ -2,11 +2,12 @@ build/*
2
2
  ext/CMakeFiles
3
3
  ext/CMakeCache.txt
4
4
  ext/Makefile
5
- ext/*.rbind
6
- ext/*.h
7
- ext/*.hpp
8
- ext/*.cc
9
- lib/ropencv/ropencv.rb
10
- lib/ropencv/ropencv_types.rb
11
- lib/ropencv/ropencv_types.so
12
-
5
+ ext/src/*.rbind
6
+ ext/src/*.h
7
+ ext/src/*.hpp
8
+ ext/src/*.cc
9
+ lib/ruby/ropencv/ropencv.rb
10
+ lib/ruby/ropencv/ropencv_types.rb
11
+ lib/lib
12
+ lib/include
13
+ *.gem
data/CMakeLists.txt CHANGED
@@ -1,19 +1,3 @@
1
1
  cmake_minimum_required(VERSION 2.6)
2
-
3
- SET(CMAKE_INSTALL TRUE)
4
2
  add_subdirectory(ext)
5
- FIND_PACKAGE(Ruby)
6
- IF(NOT RUBY_INCLUDE_PATH)
7
- MESSAGE(STATUS "Ruby library not found. Cannot install OpenCV ruby extensions")
8
- ELSEIF(NOT RUBY_EXTENSIONS_AVAILABLE)
9
- STRING(REGEX REPLACE ".*lib(32|64)?/?" "lib/" RUBY_LIBRARY_INSTALL_DIR ${RUBY_RUBY_LIB_PATH})
10
-
11
- FIND_PROGRAM(RDOC_EXECUTABLE NAMES rdoc1.9 rdoc1.8 rdoc)
12
- FIND_PROGRAM(YARD_EXECUTABLE NAMES yard)
13
-
14
- INSTALL(FILES lib/ropencv.rb
15
- DESTINATION ${RUBY_LIBRARY_INSTALL_DIR})
16
- INSTALL(DIRECTORY lib/ropencv
17
- DESTINATION ${RUBY_LIBRARY_INSTALL_DIR})
18
- ENDIF(NOT RUBY_INCLUDE_PATH)
19
3
 
data/ext/CMakeLists.txt CHANGED
@@ -1,38 +1,2 @@
1
1
  cmake_minimum_required(VERSION 2.6)
2
- PROJECT(rbind_opencv CXX)
3
-
4
- include(FindPkgConfig)
5
- pkg_check_modules(OPENCV REQUIRED opencv)
6
- add_definitions(${OPENCV_CFLAGS})
7
- include_directories(${OPENCV_INCLUDE_DIRS})
8
- link_directories(${OPENCV_LIBRARY_DIRS})
9
-
10
- SET(RBIND_SRC
11
- "${CMAKE_CURRENT_SOURCE_DIR}/types.cc"
12
- "${CMAKE_CURRENT_SOURCE_DIR}/operations.cc"
13
- "${CMAKE_CURRENT_SOURCE_DIR}/conversions.cc")
14
-
15
- if(CMAKE_INSTALL)
16
- add_custom_command(OUTPUT ${RBIND_SRC}
17
- COMMAND ruby "${CMAKE_CURRENT_SOURCE_DIR}/extconf.rb")
18
- endif()
19
-
20
- ADD_LIBRARY(rbind_opencv SHARED ${RBIND_SRC})
21
-
22
- TARGET_LINK_LIBRARIES(rbind_opencv ${OPENCV_LIBS} ${OPENCV_LDFLAGS} )
23
- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/rbind.pc.in ${CMAKE_CURRENT_BINARY_DIR}/rbind_ropencv.pc @ONLY)
24
- install(TARGETS rbind_opencv LIBRARY DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/../lib/ropencv)
25
-
26
- if(CMAKE_INSTALL)
27
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/rbind_ropencv.pc DESTINATION lib/pkgconfig)
28
- install(TARGETS rbind_opencv LIBRARY DESTINATION lib)
29
- install(FILES types.h operations.h conversions.hpp DESTINATION include/${PROJECT_NAME}/${DIR})
30
-
31
- if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/extern.rbind)
32
- install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/extern.rbind DESTINATION include/${PROJECT_NAME}/${DIR})
33
- endif()
34
-
35
- if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/config.rbind)
36
- install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/config.rbind DESTINATION include/${PROJECT_NAME}/${DIR})
37
- endif()
38
- endif()
2
+ add_subdirectory(src)
data/ext/extconf.rb CHANGED
@@ -1,113 +1,5 @@
1
- require 'rbind'
2
- require 'pp'
3
- require File.join(File.dirname(__FILE__),'specializing.rb')
4
-
5
- rbind = Rbind::Rbind.new("OpenCV")
6
- rbind.pkg_config << "opencv"
7
-
8
- # find opencv header path
9
- out = IO.popen("pkg-config --cflags-only-I opencv")
10
- paths = out.read.split("-I").delete_if(&:empty?).map do |i|
11
- i.gsub("\n","").gsub(" ","").gsub("opencv","")
12
- end
13
- raise "Cannot find OpenCV" if paths.empty?
14
-
15
- #check opencv version
16
- out = IO.popen("pkg-config --modversion opencv")
17
- opencv_version = out.read.chomp
18
-
19
- ##add opencv headers
20
- if opencv_version == "2.4.4"
21
- rbind.includes = ["opencv2/core/core_c.h", "opencv2/core/types_c.h",
22
- "opencv2/core/core.hpp", "opencv2/flann/miniflann.hpp",
23
- "opencv2/imgproc/imgproc_c.h", "opencv2/imgproc/types_c.h",
24
- "opencv2/imgproc/imgproc.hpp", "opencv2/photo/photo_c.h",
25
- "opencv2/photo/photo.hpp", "opencv2/video/video.hpp",
26
- "opencv2/features2d/features2d.hpp", "opencv2/objdetect/objdetect.hpp",
27
- "opencv2/calib3d/calib3d.hpp", "opencv2/ml/ml.hpp",
28
- "opencv2/highgui/highgui_c.h", "opencv2/highgui/highgui.hpp",
29
- "opencv2/contrib/contrib.hpp", "opencv2/nonfree/nonfree.hpp",
30
- "opencv2/nonfree/features2d.hpp"]
31
- elsif opencv_version >= "2.4.9"
32
- rbind.includes = ["opencv2/core.hpp", "opencv2/core/types.hpp",
33
- "opencv2/core/utility.hpp", "opencv2/core/base.hpp",
34
- "opencv2/contrib.hpp", "opencv2/calib3d.hpp",
35
- "opencv2/features2d.hpp", "opencv2/flann.hpp",
36
- "opencv2/highgui.hpp", "opencv2/imgproc.hpp",
37
- "opencv2/ml.hpp", "opencv2/nonfree.hpp",
38
- "opencv2/nonfree/features2d.hpp", "opencv2/objdetect.hpp",
39
- "opencv2/photo.hpp", "opencv2/softcascade.hpp",
40
- "opencv2/stitching.hpp", "opencv2/superres.hpp",
41
- "opencv2/video.hpp", "opencv2/legacy.hpp",
42
- "opencv2/videostab.hpp"]
43
- else
44
- raise "OpenCV version #{opencv_version} is not supported"
45
- end
46
-
47
- # check that all headers are available
48
- rbind.includes = rbind.includes.map do |i|
49
- path = File.join(paths[0],i)
50
- if !File.exist?(path)
51
- ::Rbind.log.info "OpenCV version does not support #{path}"
52
- nil
53
- else
54
- path
55
- end
56
- end.compact
57
- Rbind.log.info "found opencv #{opencv_version}: #{paths[0]}"
58
-
59
- # auto add vector and ptr types if missing
60
- rbind.on_type_not_found do |owner,type|
61
- if type =~ /Ptr_(.*)/
62
- t = rbind.parser.find_type(owner,$1)
63
- t2 = Rbind::RPtr.new(type,rbind,t).typedef("cv::Ptr<#{t.full_name} >")
64
- rbind.parser.add_type t2
65
- elsif type =~ /vector_(.*)/
66
- t = rbind.parser.find_type(owner,$1)
67
- t2 = Rbind::RVector.new(type,rbind,t).typedef("std::vector<#{t.full_name} >")
68
- rbind.parser.add_type t2
69
- end
70
- end
71
-
72
- # parsing
73
- rbind.parse File.join(File.dirname(__FILE__),"pre_opencv244.txt")
74
- rbind.parse File.join(File.dirname(__FILE__),"opencv.txt")
75
- rbind.use_namespace rbind.cv
76
- rbind.cv.types_alias["string"] = rbind.cv.String
77
- rbind.parse_headers
78
- rbind.parse File.join(File.dirname(__FILE__),"post_opencv244.txt")
79
-
80
- # post parsing + patching wrong signatures
81
- if opencv_version == "2.4.4"
82
- rbind.cv.CascadeClassifier.detectMultiScale[1].parameter(2).add_flag(:IO)
83
- rbind.cv.CascadeClassifier.detectMultiScale[1].parameter(3).add_flag(:IO)
84
- elsif opencv_version >= "2.4.9"
85
- rbind.parse File.join(File.dirname(__FILE__),"post_opencv249.txt")
86
- rbind.cv.randShuffle.parameter(2).add_flag(:IO)
87
- else
88
- raise "not supported opencv version"
89
- end
90
-
91
- rbind.cv.BRISK.generateKernel.parameter(0).add_flag(:IO)
92
- rbind.cv.BRISK.generateKernel.parameter(1).add_flag(:IO)
93
- rbind.cv.BRISK.operation("BRISK")[1].parameter(0).add_flag(:IO)
94
- rbind.cv.BRISK.operation("BRISK")[1].parameter(1).add_flag(:IO)
95
-
96
- rbind.cv.putText.parameter(0).add_flag(:IO)
97
- rbind.cv.chamerMatching.parameter(0).add_flag(:IO)
98
- rbind.cv.chamerMatching.parameter(1).add_flag(:IO)
99
- rbind.cv.chamerMatching.parameter(2).add_flag(:IO)
100
-
101
- # add some more vector types
102
- rbind.parser.find_type(rbind,"vector_Point3f")
103
- rbind.parser.find_type(rbind,"vector_Point3d")
104
-
105
- # generate files
106
- rbind.generator_ruby.file_prefix = "ropencv"
107
- rbind.generate(File.join(File.dirname(__FILE__)),File.join(File.dirname(__FILE__),"..","lib","ropencv"))
108
-
109
- Dir.chdir(rbind.generator_c.output_path) do
110
- if !system("cmake .")
1
+ Dir.chdir(File.dirname(__FILE__)) do
2
+ if !system("cmake . -DGEM_INSTALL=TRUE")
111
3
  raise "CMake Configure Error"
112
4
  end
113
5
  end
data/ext/rbind.rb ADDED
@@ -0,0 +1,108 @@
1
+ require 'rbind'
2
+ require 'pp'
3
+ require File.join(File.dirname(__FILE__),'specializing.rb')
4
+
5
+ rbind = Rbind::Rbind.new("OpenCV")
6
+ rbind.pkg_config << "opencv"
7
+
8
+ # find opencv header path
9
+ out = IO.popen("pkg-config --cflags-only-I opencv")
10
+ paths = out.read.split("-I").delete_if(&:empty?).map do |i|
11
+ i.gsub("\n","").gsub(" ","").gsub("opencv","")
12
+ end
13
+ raise "Cannot find OpenCV" if paths.empty?
14
+
15
+ #check opencv version
16
+ out = IO.popen("pkg-config --modversion opencv")
17
+ opencv_version = out.read.chomp
18
+
19
+ ##add opencv headers
20
+ if opencv_version == "2.4.4"
21
+ rbind.includes = ["opencv2/core/core_c.h", "opencv2/core/types_c.h",
22
+ "opencv2/core/core.hpp", "opencv2/flann/miniflann.hpp",
23
+ "opencv2/imgproc/imgproc_c.h", "opencv2/imgproc/types_c.h",
24
+ "opencv2/imgproc/imgproc.hpp", "opencv2/photo/photo_c.h",
25
+ "opencv2/photo/photo.hpp", "opencv2/video/video.hpp",
26
+ "opencv2/features2d/features2d.hpp", "opencv2/objdetect/objdetect.hpp",
27
+ "opencv2/calib3d/calib3d.hpp", "opencv2/ml/ml.hpp",
28
+ "opencv2/highgui/highgui_c.h", "opencv2/highgui/highgui.hpp",
29
+ "opencv2/contrib/contrib.hpp", "opencv2/nonfree/nonfree.hpp",
30
+ "opencv2/nonfree/features2d.hpp"]
31
+ elsif opencv_version >= "2.4.9"
32
+ rbind.includes = ["opencv2/core.hpp", "opencv2/core/types.hpp",
33
+ "opencv2/core/utility.hpp", "opencv2/core/base.hpp",
34
+ "opencv2/contrib.hpp", "opencv2/calib3d.hpp",
35
+ "opencv2/features2d.hpp", "opencv2/flann.hpp",
36
+ "opencv2/highgui.hpp", "opencv2/imgproc.hpp",
37
+ "opencv2/ml.hpp", "opencv2/nonfree.hpp",
38
+ "opencv2/nonfree/features2d.hpp", "opencv2/objdetect.hpp",
39
+ "opencv2/photo.hpp", "opencv2/softcascade.hpp",
40
+ "opencv2/stitching.hpp", "opencv2/superres.hpp",
41
+ "opencv2/video.hpp", "opencv2/legacy.hpp",
42
+ "opencv2/videostab.hpp"]
43
+ else
44
+ raise "OpenCV version #{opencv_version} is not supported"
45
+ end
46
+
47
+ # check that all headers are available
48
+ rbind.includes = rbind.includes.map do |i|
49
+ path = File.join(paths[0],i)
50
+ if !File.exist?(path)
51
+ ::Rbind.log.info "OpenCV version does not support #{path}"
52
+ nil
53
+ else
54
+ path
55
+ end
56
+ end.compact
57
+ Rbind.log.info "found opencv #{opencv_version}: #{paths[0]}"
58
+
59
+ # auto add vector and ptr types if missing
60
+ rbind.on_type_not_found do |owner,type|
61
+ if type =~ /Ptr_(.*)/
62
+ t = rbind.parser.find_type(owner,$1)
63
+ t2 = Rbind::RPtr.new(type,rbind,t).typedef("cv::Ptr<#{t.full_name} >")
64
+ rbind.parser.add_type t2
65
+ elsif type =~ /vector_(.*)/
66
+ t = rbind.parser.find_type(owner,$1)
67
+ t2 = Rbind::RVector.new(type,rbind,t).typedef("std::vector<#{t.full_name} >")
68
+ rbind.parser.add_type t2
69
+ end
70
+ end
71
+
72
+ # parsing
73
+ rbind.parse File.join(File.dirname(__FILE__),"pre_opencv244.txt")
74
+ rbind.parse File.join(File.dirname(__FILE__),"opencv.txt")
75
+ rbind.use_namespace rbind.cv
76
+ rbind.cv.types_alias["string"] = rbind.cv.String
77
+ rbind.parse_headers
78
+ rbind.parse File.join(File.dirname(__FILE__),"post_opencv244.txt")
79
+
80
+ # post parsing + patching wrong signatures
81
+ if opencv_version == "2.4.4"
82
+ rbind.cv.CascadeClassifier.detectMultiScale[1].parameter(2).add_flag(:IO)
83
+ rbind.cv.CascadeClassifier.detectMultiScale[1].parameter(3).add_flag(:IO)
84
+ elsif opencv_version >= "2.4.9"
85
+ rbind.parse File.join(File.dirname(__FILE__),"post_opencv249.txt")
86
+ rbind.cv.randShuffle.parameter(2).add_flag(:IO)
87
+ else
88
+ raise "not supported opencv version"
89
+ end
90
+
91
+ rbind.cv.BRISK.generateKernel.parameter(0).add_flag(:IO)
92
+ rbind.cv.BRISK.generateKernel.parameter(1).add_flag(:IO)
93
+ rbind.cv.BRISK.operation("BRISK")[1].parameter(0).add_flag(:IO)
94
+ rbind.cv.BRISK.operation("BRISK")[1].parameter(1).add_flag(:IO)
95
+
96
+ rbind.cv.putText.parameter(0).add_flag(:IO)
97
+ rbind.cv.chamerMatching.parameter(0).add_flag(:IO)
98
+ rbind.cv.chamerMatching.parameter(1).add_flag(:IO)
99
+ rbind.cv.chamerMatching.parameter(2).add_flag(:IO)
100
+
101
+ # add some more vector types
102
+ rbind.parser.find_type(rbind,"vector_Point3f")
103
+ rbind.parser.find_type(rbind,"vector_Point3d")
104
+
105
+ # generate files
106
+ rbind.generator_ruby.file_prefix = "ropencv"
107
+ rbind.generate(File.join(File.dirname(__FILE__),"src"),File.join(File.dirname(__FILE__),"..","lib","ruby","ropencv"))
108
+
@@ -0,0 +1,50 @@
1
+ cmake_minimum_required(VERSION 2.6)
2
+ PROJECT(rbind_opencv CXX)
3
+
4
+ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
5
+ include(FindPkgConfig)
6
+ pkg_check_modules(OPENCV REQUIRED opencv)
7
+ add_definitions(${OPENCV_CFLAGS})
8
+ include_directories(${OPENCV_INCLUDE_DIRS})
9
+ link_directories(${OPENCV_LIBRARY_DIRS})
10
+
11
+
12
+
13
+ SET(RBIND_SRC
14
+ "${CMAKE_CURRENT_SOURCE_DIR}/types.cc"
15
+ "${CMAKE_CURRENT_SOURCE_DIR}/operations.cc"
16
+ "${CMAKE_CURRENT_SOURCE_DIR}/conversions.cc")
17
+
18
+ add_custom_command(OUTPUT ${RBIND_SRC}
19
+ COMMAND ruby "${CMAKE_CURRENT_SOURCE_DIR}/../rbind.rb")
20
+
21
+ ADD_LIBRARY(rbind_opencv SHARED ${RBIND_SRC})
22
+ TARGET_LINK_LIBRARIES(rbind_opencv ${OPENCV_LIBS} ${OPENCV_LDFLAGS} ${GEM_LIBRARIES})
23
+
24
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/rbind.pc.in ${CMAKE_CURRENT_BINARY_DIR}/rbind_opencv.pc @ONLY)
25
+ set(ROOT_FOLDER ${CMAKE_CURRENT_SOURCE_DIR}/../..)
26
+
27
+ # global install
28
+ if(GEM_INSTALL)
29
+ # local install
30
+ install(TARGETS rbind_opencv LIBRARY DESTINATION ${ROOT_FOLDER}/lib/lib)
31
+ install(FILES types.h operations.h conversions.hpp DESTINATION ${ROOT_FOLDER}/lib/include)
32
+ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/extern.rbind DESTINATION ${ROOT_FOLDER}/lib/include)
33
+ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/config.rbind DESTINATION ${ROOT_FOLDER}/lib/include)
34
+ else()
35
+ # global install
36
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/rbind_opencv.pc DESTINATION lib/pkgconfig)
37
+ install(TARGETS rbind_opencv LIBRARY DESTINATION lib)
38
+ install(FILES types.h operations.h conversions.hpp DESTINATION include/${PROJECT_NAME})
39
+ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/extern.rbind DESTINATION include/${PROJECT_NAME})
40
+ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/config.rbind DESTINATION include/${PROJECT_NAME})
41
+
42
+ FIND_PACKAGE(Ruby)
43
+ IF(NOT RUBY_INCLUDE_PATH)
44
+ MESSAGE(STATUS "Ruby library not found. Cannot install ruby extensions")
45
+ ELSEIF(NOT RUBY_EXTENSIONS_AVAILABLE)
46
+ STRING(REGEX REPLACE ".*lib(32|64)?/?" "lib/" RUBY_LIBRARY_INSTALL_DIR ${RUBY_RUBY_LIB_PATH})
47
+ INSTALL(DIRECTORY ${ROOT_FOLDER}/lib/ruby DESTINATION ${RUBY_LIBRARY_INSTALL_DIR}
48
+ FILES_MATCHING PATTERN "*.rb")
49
+ ENDIF(NOT RUBY_INCLUDE_PATH)
50
+ endif()
@@ -0,0 +1,155 @@
1
+ # Author thomas.roehr@dfki.de
2
+ #
3
+ # Version 0.3 2013-07-02
4
+ # - rely on `gem content` to find library and header
5
+ # - introduce GEM_OS_PKG to allow search via pkgconfig
6
+ # Version 0.2 2010-01-14
7
+ # - add support for searching for multiple gems
8
+ # Version 0.1 2010-12-15
9
+ # - support basic search functionality
10
+ # - tested to find rice
11
+ #
12
+ # OUTPUT:
13
+ #
14
+ # GEM_INCLUDE_DIRS After successful search contains the include directores
15
+ #
16
+ # GEM_LIBRARIES After successful search contains the full path of each found library
17
+ #
18
+ #
19
+ # Usage:
20
+ # set(GEM_DEBUG TRUE)
21
+ # find_package(Gem COMPONENTS rice hoe)
22
+ # include_directories(${GEM_INCLUDE_DIRS})
23
+ # target_link_libraries(${GEM_LIBRARIES}
24
+ #
25
+ # in case pkg-config should be used to search for the os pkg, set GEM_OS_PKG, i.e.
26
+ # set(GEM_OS_PKG TRUE)
27
+ #
28
+ # Check for how 'gem' should be called
29
+ find_program(GEM_EXECUTABLE
30
+ NAMES "gem${RUBY_VERSION_MAJOR}${RUBY_VERSION_MINOR}"
31
+ "gem${RUBY_VERSION_MAJOR}.${RUBY_VERSION_MINOR}"
32
+ "gem-${RUBY_VERSION_MAJOR}${RUBY_VERSION_MINOR}"
33
+ "gem-${RUBY_VERSION_MAJOR}.${RUBY_VERSION_MINOR}"
34
+ "gem${RUBY_VERSION_MAJOR}${RUBY_VERSION_MINOR}${RUBY_VERSION_PATCH}"
35
+ "gem${RUBY_VERSION_MAJOR}.${RUBY_VERSION_MINOR}.${RUBY_VERSION_PATCH}"
36
+ "gem-${RUBY_VERSION_MAJOR}${RUBY_VERSION_MINOR}${RUBY_VERSION_PATCH}"
37
+ "gem-${RUBY_VERSION_MAJOR}.${RUBY_VERSION_MINOR}.${RUBY_VERSION_PATCH}"
38
+ "gem")
39
+
40
+ # Making backward compatible
41
+ if(Gem_DEBUG)
42
+ set(GEM_DEBUG TRUE)
43
+ endif()
44
+
45
+ if(NOT GEM_EXECUTABLE)
46
+ MESSAGE(FATAL_ERROR "Could not find the gem executable - install 'gem' first")
47
+ endif()
48
+
49
+ if(NOT Gem_FIND_COMPONENTS)
50
+ MESSAGE(FATAL_ERROR "If searching for a Gem you have to provide COMPONENTS with the name of the gem")
51
+ endif()
52
+
53
+ set(GEM_FOUND TRUE)
54
+ foreach(Gem_NAME ${Gem_FIND_COMPONENTS})
55
+ # If the gem is installed as a gem
56
+ if(NOT GEM_OS_PKG)
57
+ set(GEM_HOME ENV{GEM_HOME})
58
+
59
+ # Use `gem content <gem-name>` to extract current information about installed gems
60
+ # Store the information into ${GEM_LOCAL_INFO}
61
+ EXECUTE_PROCESS(COMMAND ${GEM_EXECUTABLE} content ${Gem_NAME} OUTPUT_VARIABLE GEM_LOCAL_INFO)
62
+
63
+ if("${GEM_LOCAL_INFO}" STREQUAL "")
64
+ MESSAGE(FATAL_ERROR "No local gem found. Check your GEM_HOME setting!")
65
+ else()
66
+ set(_library_NAME_PATTERN lib${Gem_NAME}.a
67
+ lib${Gem_NAME}.so
68
+ lib${Gem_NAME}.dylib
69
+ ${Gem_NAME}.a
70
+ ${Gem_NAME}.so
71
+ ${Gem_NAME}.dylib
72
+ .*.a
73
+ .*.so
74
+ .*.dylib
75
+ )
76
+
77
+ set(_header_SUFFIX_PATTERN
78
+ .h
79
+ .hh
80
+ .hpp
81
+ )
82
+
83
+ # Create a list from the output results of the gem command
84
+ string(REPLACE "\n" ";" GEM_CONTENT_LIST ${GEM_LOCAL_INFO})
85
+ foreach(_gem_CONTENT_PATH ${GEM_CONTENT_LIST})
86
+
87
+ # Convert so that only '/' Unix path separator are being using
88
+ # needed to do proper regex matching
89
+ FILE(TO_CMAKE_PATH ${_gem_CONTENT_PATH} gem_CONTENT_PATH)
90
+
91
+ # Identify library -- checking for a library in the gems 'lib' (sub)directory
92
+ # Search for an existing library, but only within the gems folder
93
+ foreach(_library_NAME ${_library_NAME_PATTERN})
94
+ STRING(REGEX MATCH ".*${Gem_NAME}.*/lib/.*${_library_NAME}$" GEM_PATH_INFO "${gem_CONTENT_PATH}")
95
+ if(NOT "${GEM_PATH_INFO}" STREQUAL "")
96
+ list(APPEND GEM_LIBRARIES ${GEM_PATH_INFO})
97
+ break()
98
+ endif()
99
+ endforeach()
100
+
101
+ # Identify headers
102
+ # Checking for available headers in an include directory
103
+ foreach(_header_PATTERN ${_header_SUFFIX_PATTERN})
104
+ STRING(REGEX MATCH ".*${Gem_NAME}.*/include/.*${_header_PATTERN}$" GEM_PATH_INFO "${gem_CONTENT_PATH}")
105
+ if(NOT "${GEM_PATH_INFO}" STREQUAL "")
106
+ STRING(REGEX REPLACE "(.*${Gem_NAME}.*/include/).*${_header_PATTERN}$" "\\1" GEM_PATH_INFO "${gem_CONTENT_PATH}")
107
+ list(APPEND GEM_INCLUDE_DIRS ${GEM_PATH_INFO})
108
+ break()
109
+ endif()
110
+ endforeach()
111
+ endforeach()
112
+
113
+ # Compact the lists
114
+ if(${GEM_LIBRARIES})
115
+ LIST(REMOVE_DUPLICATES GEM_LIBRARIES)
116
+ endif()
117
+ if(${GEM_INCLUDE_DIRS})
118
+ LIST(REMOVE_DUPLICATES GEM_INCLUDE_DIRS)
119
+ endif()
120
+ endif()
121
+ else(NOT GEM_OS_PKG)
122
+ pkg_check_modules(GEM_PKG ${Gem_NAME})
123
+ set(GEM_INCLUDE_DIRS ${GEM_PKG_INCLUDE_DIRS})
124
+ set(GEM_LIBRARIES ${GEM_PKG_LIBRARIES} ${GEM_PKG_STATIC_LIBRARIES})
125
+ list(APPEND GEM_LIBRARIES ${GEM_PKG_LDFLAGS} ${GEM_PKG_STATIC_LDFLAGS})
126
+ list(APPEND GEM_LIBRARIES ${GEM_PKG_LDFLAGS_OTHER} ${GEM_PKG_STATIC_LDFLAGS_OTHER})
127
+
128
+ if(GEM_DEBUG)
129
+ message(STATUS "GEM_OS_PKG is defined")
130
+ message(STATUS "GEM_INCLUDE_DIRS ${GEM_INCLUDE_DIRS}")
131
+ message(STATUS "GEM_STATIC_LIBRARY_DIRS ${GEM_PKG_STATIC_LIBRARY_DIRS}")
132
+ message(STATUS "GEM_LIBRARY_DIRS ${GEM_PKG_STATIC_LIBRARY_DIRS}")
133
+ message(STATUS "GEM_STATIC_LIBRARIES ${GEM_PKG_STATIC_LIBRARIES}")
134
+ message(STATUS "GEM_LIBRARIES ${GEM_LIBRARIES}")
135
+ endif()
136
+ endif()
137
+
138
+ if("${GEM_LIBRARIES}" STREQUAL "")
139
+ set(GEM_FOUND FALSE)
140
+ else()
141
+ MESSAGE(STATUS "Gem: ${Gem_NAME} found")
142
+ endif()
143
+
144
+ if(GEM_DEBUG)
145
+ message(STATUS "${Gem_NAME} library dir: ${GEM_LIBRARIES}")
146
+ message(STATUS "${Gem_NAME} include dir: ${GEM_INCLUDE_DIRS}")
147
+ endif()
148
+
149
+ if(Gem_FIND_REQUIRED)
150
+ if(NOT GEM_FOUND)
151
+ MESSAGE(FATAL_ERROR "Gem: ${Gem_NAME} could not be found")
152
+ endif()
153
+ endif()
154
+ endforeach()
155
+
@@ -0,0 +1,260 @@
1
+ # - Find Ruby
2
+ # This module finds if Ruby is installed and determines where the include files
3
+ # and libraries are. Ruby 1.8 and 1.9 are supported. The minimum required version
4
+ # specified in the find_package() command is honored.
5
+ # It also determines what the name of the library is. This
6
+ # code sets the following variables:
7
+ #
8
+ # RUBY_EXECUTABLE = full path to the ruby binary
9
+ # RUBY_INCLUDE_DIRS = include dirs to be used when using the ruby library
10
+ # RUBY_LIBRARY = full path to the ruby library
11
+ # RUBY_VERSION = the version of ruby which was found, e.g. "1.8.7"
12
+ # RUBY_FOUND = set to true if ruby ws found successfully
13
+ #
14
+ # RUBY_INCLUDE_PATH = same as RUBY_INCLUDE_DIRS, only provided for compatibility reasons, don't use it
15
+
16
+ #=============================================================================
17
+ # Copyright 2004-2009 Kitware, Inc.
18
+ # Copyright 2008-2009 Alexander Neundorf <neundorf@kde.org>
19
+ #
20
+ # Distributed under the OSI-approved BSD License (the "License");
21
+ # see accompanying file Copyright.txt for details.
22
+ #
23
+ # This software is distributed WITHOUT ANY WARRANTY; without even the
24
+ # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
25
+ # See the License for more information.
26
+ #=============================================================================
27
+ # (To distributed this file outside of CMake, substitute the full
28
+ # License text for the above reference.)
29
+
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
+
36
+ # uncomment the following line to get debug output for this file
37
+ # SET(_RUBY_DEBUG_OUTPUT TRUE)
38
+
39
+ # Determine the list of possible names of the ruby executable depending
40
+ # on which version of ruby is required
41
+ SET(_RUBY_POSSIBLE_EXECUTABLE_NAMES ${RUBY_PROGRAM_NAME} ruby)
42
+
43
+ # if 1.9 is required, don't look for ruby18 and ruby1.8, default to version 1.8
44
+ IF(Ruby_FIND_VERSION_MAJOR AND Ruby_FIND_VERSION_MINOR)
45
+ SET(Ruby_FIND_VERSION_SHORT_NODOT "${Ruby_FIND_VERSION_MAJOR}${RUBY_FIND_VERSION_MINOR}")
46
+ ELSE(Ruby_FIND_VERSION_MAJOR AND Ruby_FIND_VERSION_MINOR)
47
+ SET(Ruby_FIND_VERSION_SHORT_NODOT "18")
48
+ ENDIF(Ruby_FIND_VERSION_MAJOR AND Ruby_FIND_VERSION_MINOR)
49
+
50
+ SET(_RUBY_POSSIBLE_EXECUTABLE_NAMES ${_RUBY_POSSIBLE_EXECUTABLE_NAMES} ruby1.9 ruby19)
51
+
52
+ # if we want a version below 1.9, also look for ruby 1.8
53
+ IF("${Ruby_FIND_VERSION_SHORT_NODOT}" VERSION_LESS "19")
54
+ SET(_RUBY_POSSIBLE_EXECUTABLE_NAMES ${_RUBY_POSSIBLE_EXECUTABLE_NAMES} ruby1.8 ruby18)
55
+ ENDIF("${Ruby_FIND_VERSION_SHORT_NODOT}" VERSION_LESS "19")
56
+
57
+ FIND_PROGRAM(RUBY_EXECUTABLE NAMES ${_RUBY_POSSIBLE_EXECUTABLE_NAMES})
58
+
59
+
60
+ IF(RUBY_EXECUTABLE AND NOT RUBY_MAJOR_VERSION)
61
+ # query the ruby version
62
+ EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['MAJOR']"
63
+ OUTPUT_VARIABLE RUBY_VERSION_MAJOR)
64
+
65
+ EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['MINOR']"
66
+ OUTPUT_VARIABLE RUBY_VERSION_MINOR)
67
+
68
+ EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['TEENY']"
69
+ OUTPUT_VARIABLE RUBY_VERSION_PATCH)
70
+
71
+ # query the different directories
72
+ EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['archdir']"
73
+ OUTPUT_VARIABLE RUBY_ARCH_DIR)
74
+
75
+ EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['arch']"
76
+ OUTPUT_VARIABLE RUBY_ARCH)
77
+
78
+ EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['rubyhdrdir']"
79
+ OUTPUT_VARIABLE RUBY_HDR_DIR)
80
+
81
+ EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['libdir']"
82
+ OUTPUT_VARIABLE RUBY_POSSIBLE_LIB_DIR)
83
+
84
+ EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['rubylibdir']"
85
+ OUTPUT_VARIABLE RUBY_RUBY_LIB_DIR)
86
+
87
+ EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['LIBRUBY_SO']"
88
+ OUTPUT_VARIABLE RUBY_RUBY_LIBRARY)
89
+ STRING(REGEX REPLACE "^lib" "" RUBY_RUBY_LIBRARY "${RUBY_RUBY_LIBRARY}")
90
+ STRING(REGEX REPLACE "\\.so.*" "" RUBY_RUBY_LIBRARY "${RUBY_RUBY_LIBRARY}")
91
+
92
+ # site_ruby
93
+ EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['sitearchdir']"
94
+ OUTPUT_VARIABLE RUBY_SITEARCH_DIR)
95
+
96
+ EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['sitelibdir']"
97
+ OUTPUT_VARIABLE RUBY_SITELIB_DIR)
98
+
99
+ # vendor_ruby available ?
100
+ EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r vendor-specific -e "print 'true'"
101
+ OUTPUT_VARIABLE RUBY_HAS_VENDOR_RUBY ERROR_QUIET)
102
+
103
+ IF(RUBY_HAS_VENDOR_RUBY)
104
+ EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['vendorlibdir']"
105
+ OUTPUT_VARIABLE RUBY_VENDORLIB_DIR)
106
+
107
+ EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['vendorarchdir']"
108
+ OUTPUT_VARIABLE RUBY_VENDORARCH_DIR)
109
+ ENDIF(RUBY_HAS_VENDOR_RUBY)
110
+
111
+ # save the results in the cache so we don't have to run ruby the next time again
112
+ SET(RUBY_VERSION_MAJOR ${RUBY_VERSION_MAJOR} CACHE PATH "The Ruby major version" FORCE)
113
+ SET(RUBY_VERSION_MINOR ${RUBY_VERSION_MINOR} CACHE PATH "The Ruby minor version" FORCE)
114
+ SET(RUBY_VERSION_PATCH ${RUBY_VERSION_PATCH} CACHE PATH "The Ruby patch version" FORCE)
115
+ SET(RUBY_ARCH_DIR ${RUBY_ARCH_DIR} CACHE PATH "The Ruby arch dir" FORCE)
116
+ SET(RUBY_HDR_DIR ${RUBY_HDR_DIR} CACHE PATH "The Ruby header dir (1.9)" FORCE)
117
+ SET(RUBY_POSSIBLE_LIB_DIR ${RUBY_POSSIBLE_LIB_DIR} CACHE PATH "The Ruby lib dir" FORCE)
118
+ SET(RUBY_RUBY_LIB_DIR ${RUBY_RUBY_LIB_DIR} CACHE PATH "The Ruby ruby-lib dir" FORCE)
119
+ SET(RUBY_SITEARCH_DIR ${RUBY_SITEARCH_DIR} CACHE PATH "The Ruby site arch dir" FORCE)
120
+ SET(RUBY_SITELIB_DIR ${RUBY_SITELIB_DIR} CACHE PATH "The Ruby site lib dir" FORCE)
121
+ SET(RUBY_HAS_VENDOR_RUBY ${RUBY_HAS_VENDOR_RUBY} CACHE BOOL "Vendor Ruby is available" FORCE)
122
+ SET(RUBY_VENDORARCH_DIR ${RUBY_VENDORARCH_DIR} CACHE PATH "The Ruby vendor arch dir" FORCE)
123
+ SET(RUBY_VENDORLIB_DIR ${RUBY_VENDORLIB_DIR} CACHE PATH "The Ruby vendor lib dir" FORCE)
124
+
125
+ MARK_AS_ADVANCED(
126
+ RUBY_ARCH_DIR
127
+ RUBY_ARCH
128
+ RUBY_HDR_DIR
129
+ RUBY_POSSIBLE_LIB_DIR
130
+ RUBY_RUBY_LIB_DIR
131
+ RUBY_SITEARCH_DIR
132
+ RUBY_SITELIB_DIR
133
+ RUBY_HAS_VENDOR_RUBY
134
+ RUBY_VENDORARCH_DIR
135
+ RUBY_VENDORLIB_DIR
136
+ RUBY_VERSION_MAJOR
137
+ RUBY_VERSION_MINOR
138
+ RUBY_VERSION_PATCH
139
+ )
140
+ ENDIF(RUBY_EXECUTABLE AND NOT RUBY_MAJOR_VERSION)
141
+
142
+ # In case RUBY_EXECUTABLE could not be executed (e.g. cross compiling)
143
+ # try to detect which version we found. This is not too good.
144
+ IF(NOT RUBY_VERSION_MAJOR)
145
+ # by default assume 1.8.0
146
+ SET(RUBY_VERSION_MAJOR 1)
147
+ SET(RUBY_VERSION_MINOR 8)
148
+ SET(RUBY_VERSION_PATCH 0)
149
+ # check whether we found 1.9.x
150
+ IF(${RUBY_EXECUTABLE} MATCHES "ruby1.?9" OR RUBY_HDR_DIR)
151
+ SET(RUBY_VERSION_MAJOR 1)
152
+ SET(RUBY_VERSION_MINOR 9)
153
+ ENDIF(${RUBY_EXECUTABLE} MATCHES "ruby1.?9" OR RUBY_HDR_DIR)
154
+ ENDIF(NOT RUBY_VERSION_MAJOR)
155
+
156
+
157
+ SET(RUBY_VERSION "${RUBY_VERSION_MAJOR}.${RUBY_VERSION_MINOR}.${RUBY_VERSION_PATCH}")
158
+ SET(_RUBY_VERSION_SHORT "${RUBY_VERSION_MAJOR}.${RUBY_VERSION_MINOR}")
159
+ SET(_RUBY_VERSION_SHORT_NODOT "${RUBY_VERSION_MAJOR}${RUBY_VERSION_MINOR}")
160
+
161
+ # Now we know which version we found
162
+ IF(Ruby_FIND_VERSION)
163
+ IF(${RUBY_VERSION} VERSION_LESS ${Ruby_FIND_VERSION})
164
+ # force running ruby the next time again
165
+ SET(RUBY_VERSION_MAJOR "" CACHE PATH "The Ruby major version" FORCE)
166
+ IF(Ruby_FIND_REQUIRED)
167
+ MESSAGE(FATAL_ERROR "Ruby version ${Ruby_FIND_VERSION} required, but only version ${RUBY_VERSION} found.")
168
+ ELSE(Ruby_FIND_REQUIRED)
169
+ IF(NOT Ruby_FIND_QUIETLY)
170
+ MESSAGE(STATUS "Ruby version ${Ruby_FIND_VERSION} required, but only version ${RUBY_VERSION} found.")
171
+ ENDIF(NOT Ruby_FIND_QUIETLY)
172
+ RETURN()
173
+ ENDIF(Ruby_FIND_REQUIRED)
174
+ ENDIF(${RUBY_VERSION} VERSION_LESS ${Ruby_FIND_VERSION})
175
+ ENDIF(Ruby_FIND_VERSION)
176
+
177
+ FIND_PATH(RUBY_INCLUDE_DIR
178
+ NAMES ruby.h
179
+ HINTS
180
+ ${RUBY_HDR_DIR}
181
+ ${RUBY_ARCH_DIR}
182
+ /usr/lib/ruby/${_RUBY_VERSION_SHORT}/i586-linux-gnu/ )
183
+
184
+ SET(RUBY_INCLUDE_DIRS ${RUBY_INCLUDE_DIR} )
185
+
186
+ # if ruby > 1.8 is required or if ruby > 1.8 was found, search for the config.h dir
187
+ IF( ${Ruby_FIND_VERSION_SHORT_NODOT} GREATER 18 OR ${_RUBY_VERSION_SHORT_NODOT} GREATER 18 OR RUBY_HDR_DIR)
188
+ message(STATUS "lookign for config.h")
189
+ FIND_PATH(RUBY_CONFIG_INCLUDE_DIR
190
+ NAMES ruby/config.h config.h
191
+ HINTS
192
+ ${RUBY_HDR_DIR}/${RUBY_ARCH}
193
+ ${RUBY_ARCH_DIR}
194
+ )
195
+
196
+ SET(RUBY_INCLUDE_DIRS ${RUBY_INCLUDE_DIRS} ${RUBY_CONFIG_INCLUDE_DIR} )
197
+ ENDIF( ${Ruby_FIND_VERSION_SHORT_NODOT} GREATER 18 OR ${_RUBY_VERSION_SHORT_NODOT} GREATER 18 OR RUBY_HDR_DIR)
198
+
199
+
200
+ # Determine the list of possible names for the ruby library
201
+ SET(_RUBY_POSSIBLE_LIB_NAMES ruby ruby-static ruby${_RUBY_VERSION_SHORT} ${RUBY_RUBY_LIBRARY})
202
+
203
+ IF(WIN32)
204
+ SET( _RUBY_MSVC_RUNTIME "" )
205
+ IF( MSVC60 )
206
+ SET( _RUBY_MSVC_RUNTIME "60" )
207
+ ENDIF( MSVC60 )
208
+ IF( MSVC70 )
209
+ SET( _RUBY_MSVC_RUNTIME "70" )
210
+ ENDIF( MSVC70 )
211
+ IF( MSVC71 )
212
+ SET( _RUBY_MSVC_RUNTIME "71" )
213
+ ENDIF( MSVC71 )
214
+ IF( MSVC80 )
215
+ SET( _RUBY_MSVC_RUNTIME "80" )
216
+ ENDIF( MSVC80 )
217
+ IF( MSVC90 )
218
+ SET( _RUBY_MSVC_RUNTIME "90" )
219
+ ENDIF( MSVC90 )
220
+
221
+ LIST(APPEND _RUBY_POSSIBLE_LIB_NAMES
222
+ "msvcr${_RUBY_MSVC_RUNTIME}-ruby${RUBY_NODOT_VERSION}"
223
+ "msvcr${_RUBY_MSVC_RUNTIME}-ruby${RUBY_NODOT_VERSION}-static"
224
+ "msvcrt-ruby${RUBY_NODOT_VERSION}"
225
+ "msvcrt-ruby${RUBY_NODOT_VERSION}-static" )
226
+ ENDIF(WIN32)
227
+
228
+ FIND_LIBRARY(RUBY_LIBRARY NAMES ${_RUBY_POSSIBLE_LIB_NAMES} HINTS ${RUBY_POSSIBLE_LIB_DIR} )
229
+
230
+ INCLUDE(FindPackageHandleStandardArgs)
231
+ SET(_RUBY_REQUIRED_VARS RUBY_EXECUTABLE RUBY_INCLUDE_DIR RUBY_LIBRARY)
232
+ IF(_RUBY_VERSION_SHORT_NODOT GREATER 18)
233
+ LIST(APPEND _RUBY_REQUIRED_VARS RUBY_CONFIG_INCLUDE_DIR)
234
+ ENDIF(_RUBY_VERSION_SHORT_NODOT GREATER 18)
235
+
236
+ IF(_RUBY_DEBUG_OUTPUT)
237
+ MESSAGE(STATUS "--------FindRuby.cmake debug------------")
238
+ MESSAGE(STATUS "_RUBY_POSSIBLE_EXECUTABLE_NAMES: ${_RUBY_POSSIBLE_EXECUTABLE_NAMES}")
239
+ MESSAGE(STATUS "_RUBY_POSSIBLE_LIB_NAMES: ${_RUBY_POSSIBLE_LIB_NAMES}")
240
+ MESSAGE(STATUS "RUBY_ARCH_DIR: ${RUBY_ARCH_DIR}")
241
+ MESSAGE(STATUS "RUBY_HDR_DIR: ${RUBY_HDR_DIR}")
242
+ MESSAGE(STATUS "RUBY_POSSIBLE_LIB_DIR: ${RUBY_POSSIBLE_LIB_DIR}")
243
+ MESSAGE(STATUS "Found RUBY_VERSION: \"${RUBY_VERSION}\" , short: \"${_RUBY_VERSION_SHORT}\", nodot: \"${_RUBY_VERSION_SHORT_NODOT}\"")
244
+ MESSAGE(STATUS "_RUBY_REQUIRED_VARS: ${_RUBY_REQUIRED_VARS}")
245
+ MESSAGE(STATUS "--------------------")
246
+ ENDIF(_RUBY_DEBUG_OUTPUT)
247
+
248
+ FIND_PACKAGE_HANDLE_STANDARD_ARGS(Ruby DEFAULT_MSG ${_RUBY_REQUIRED_VARS})
249
+
250
+ MARK_AS_ADVANCED(
251
+ RUBY_EXECUTABLE
252
+ RUBY_LIBRARY
253
+ RUBY_INCLUDE_DIR
254
+ RUBY_CONFIG_INCLUDE_DIR
255
+ )
256
+
257
+ # Set some variables for compatibility with previous version of this file
258
+ SET(RUBY_POSSIBLE_LIB_PATH ${RUBY_POSSIBLE_LIB_DIR})
259
+ SET(RUBY_RUBY_LIB_PATH ${RUBY_RUBY_LIB_DIR})
260
+ SET(RUBY_INCLUDE_PATH ${RUBY_INCLUDE_DIRS})
File without changes
File without changes
File without changes
data/ropencv.gemspec CHANGED
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'ropencv'
3
- s.version = '0.0.2'
4
- s.date = '2013-06-30'
3
+ s.version = '0.0.3'
4
+ s.date = '2013-07-02'
5
5
  s.platform = Gem::Platform::RUBY
6
6
  s.authors = ['Alexander Duda']
7
7
  s.email = ['Alexander.Duda@dfki.de']
@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
9
9
  s.summary = 'Automated ffi-bindings for opencv 2.4.4 and 2.4.9'
10
10
  s.description = ''
11
11
  s.files = `git ls-files`.split("\n")
12
- s.require_path = 'lib'
12
+ s.require_path = 'lib/ruby'
13
13
  s.required_rubygems_version = ">= 1.3.6"
14
14
  s.add_runtime_dependency "rbind", "~> 0.0.8"
15
15
  s.add_runtime_dependency "ffi", "~> 1.9.0"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ropencv
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-06-30 00:00:00.000000000 Z
12
+ date: 2013-07-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rbind
@@ -64,17 +64,21 @@ files:
64
64
  - ext/post_opencv244.txt
65
65
  - ext/post_opencv249.txt
66
66
  - ext/pre_opencv244.txt
67
- - ext/rbind.pc.in
67
+ - ext/rbind.rb
68
68
  - ext/specializing.rb
69
- - lib/ropencv.rb
70
- - lib/ropencv/ropencv_ruby.rb
69
+ - ext/src/CMakeLists.txt
70
+ - ext/src/cmake/FindGem.cmake
71
+ - ext/src/cmake/FindRuby.cmake
72
+ - ext/src/rbind.pc.in
73
+ - lib/ruby/ropencv.rb
74
+ - lib/ruby/ropencv/ropencv_ruby.rb
71
75
  - ropencv.gemspec
72
76
  homepage: http://github.com/
73
77
  licenses: []
74
78
  post_install_message:
75
79
  rdoc_options: []
76
80
  require_paths:
77
- - lib
81
+ - lib/ruby
78
82
  required_ruby_version: !ruby/object:Gem::Requirement
79
83
  none: false
80
84
  requirements: