mirror of
https://github.com/ruby-opencv/ruby-opencv
synced 2023-03-27 23:22:12 -04:00
fat gem support
This commit is contained in:
parent
bdca94a0fb
commit
56e8411789
2 changed files with 25 additions and 2 deletions
|
@ -1,3 +1,13 @@
|
|||
require (File.dirname(__FILE__) + '/opencv/version')
|
||||
require 'opencv.so'
|
||||
|
||||
if RUBY_PLATFORM =~ /mingw|mswin/
|
||||
major, minor, subminor = RUBY_VERSION.split('.')
|
||||
version_dir = (major.to_i >= 2) ? '2.0' : '1.9'
|
||||
begin
|
||||
require "#{version_dir}/opencv.so"
|
||||
rescue LoadError
|
||||
require 'opencv.so'
|
||||
end
|
||||
else
|
||||
require 'opencv.so'
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue