mirror of
https://github.com/ruby-opencv/ruby-opencv
synced 2023-03-27 23:22:12 -04:00
fix for mswin32
This commit is contained in:
parent
4433b47190
commit
30709a1db0
1 changed files with 4 additions and 9 deletions
|
@ -4,6 +4,9 @@ CC = RbConfig::CONFIG['CC']
|
||||||
if CC =~ /clang/
|
if CC =~ /clang/
|
||||||
RbConfig::MAKEFILE_CONFIG['try_header'] = :try_cpp
|
RbConfig::MAKEFILE_CONFIG['try_header'] = :try_cpp
|
||||||
RbConfig::CONFIG['CPP'] = "#{CC} -E"
|
RbConfig::CONFIG['CPP'] = "#{CC} -E"
|
||||||
|
elsif RbConfig::CONFIG['arch'] =~ /mswin32/
|
||||||
|
RbConfig::MAKEFILE_CONFIG['try_header'] = :try_cpp
|
||||||
|
RbConfig::CONFIG['CPP'] = "#{CC} /P"
|
||||||
end
|
end
|
||||||
|
|
||||||
require "mkmf"
|
require "mkmf"
|
||||||
|
@ -65,15 +68,7 @@ end
|
||||||
# Check the required headers
|
# Check the required headers
|
||||||
puts ">> Check the required headers..."
|
puts ">> Check the required headers..."
|
||||||
opencv_headers.each {|header|
|
opencv_headers.each {|header|
|
||||||
unless have_header(header)
|
raise "#{header} not found." unless have_header(header)
|
||||||
if CONFIG["arch"] =~ /mswin32/ and File.exists? "#{incdir}/#{header}"
|
|
||||||
# In mswin32, have_header('opencv2/nonfree/nonfree.hpp') fails because of a syntax problem.
|
|
||||||
warn "warning: #{header} found but `have_header` failed."
|
|
||||||
$defs << "-DHAVE_#{header.tr_cpp}"
|
|
||||||
else
|
|
||||||
raise "#{header} not found."
|
|
||||||
end
|
|
||||||
end
|
|
||||||
}
|
}
|
||||||
have_header("stdarg.h")
|
have_header("stdarg.h")
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue