mirror of
https://github.com/ruby-opencv/ruby-opencv
synced 2023-03-27 23:22:12 -04:00
update extconf.rb due to new OpenCV version constants
This commit is contained in:
parent
20ba28b3bf
commit
7b91dd53c5
1 changed files with 3 additions and 3 deletions
|
@ -5,9 +5,9 @@ def cv_version_suffix(incdir)
|
|||
major, minor, subminor = nil, nil, nil
|
||||
open("#{incdir}/opencv2/core/version.hpp", 'r') { |f|
|
||||
f.read.lines.each { |line|
|
||||
major = $1.to_s if line =~ /\A#define\s+CV_MAJOR_VERSION\s+(\d+)\s*\Z/
|
||||
minor = $1.to_s if line =~ /\A#define\s+CV_MINOR_VERSION\s+(\d+)\s*\Z/
|
||||
subminor = $1.to_s if line =~ /\A#define\s+CV_SUBMINOR_VERSION\s+(\d+)\s*\Z/
|
||||
major = $1.to_s if line =~ /\A#define\s+(?:CV_VERSION_EPOCH|CV_MAJOR_VERSION)\s+(\d+)\s*\Z/
|
||||
minor = $1.to_s if line =~ /\A#define\s+(?:CV_VERSION_MAJOR|CV_MINOR_VERSION)\s+(\d+)\s*\Z/
|
||||
subminor = $1.to_s if line =~ /\A#define\s+(?:CV_VERSION_MINOR|CV_SUBMINOR_VERSION)\s+(\d+)\s*\Z/
|
||||
}
|
||||
}
|
||||
major + minor + subminor
|
||||
|
|
Loading…
Add table
Reference in a new issue