Skip to content

Commit

Permalink
tailor extconf to my own system for the moment.
Browse files Browse the repository at this point in the history
  • Loading branch information
bantic committed Mar 6, 2009
1 parent f3d4ae8 commit 311f100
Showing 1 changed file with 11 additions and 18 deletions.
29 changes: 11 additions & 18 deletions ext/extconf.rb
Expand Up @@ -11,33 +11,26 @@
=end
require "mkmf"

# -I/usr/local/include/opencv -L/usr/local/lib -lcxcore -lcv -lhighgui -lcvaux -lml

# option "opencv"
# extconf.rb --with-opencv-lib=/path/to/opencv/lib
# extconf.rb --with-opencv-include=/path/to/opencv/include

dir_config("opencv", "/opt/local/include/opencv", "/opt/local/lib")
if CONFIG["arch"].include?("darwin")
dir_config("opencv", "/usr/local/include/opencv", "/usr/local/lib")
# if CONFIG["arch"].include?("darwin")
dir_config("ffcall", "/opt/local/include", "/opt/local/lib")
else
dir_config("ffcall", "/usr/local/include", "/usr/local/lib")
end
# else
# dir_config("ffcall", "/usr/local/include", "/usr/local/lib")
# end

opencv_libraries = ["cxcore", "cv", "highgui", "cvaux", "ml"]

puts ">> check require libraries..."
case CONFIG["arch"]
when /mswin32/
have_library("msvcrt", nil)
opencv_libraries.each{|lib|
have_library(lib)
}
else
opencv_libraries.each{|lib|
raise "lib#{lib} not found." unless have_library(lib)
}
#have_library("ml")
have_library("stdc++")
end
opencv_libraries.each{|lib|
raise "lib#{lib} not found." unless have_library(lib)
}
have_library("stdc++")

# check require headers
puts ">> check require headers..."
Expand Down

0 comments on commit 311f100

Please sign in to comment.