1
0
Fork 0
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:
ser1zw 2013-05-02 07:37:23 +09:00
parent bdca94a0fb
commit 56e8411789
2 changed files with 25 additions and 2 deletions

View file

@ -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