aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/opencv.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/Library/Formula/opencv.rb b/Library/Formula/opencv.rb
index 0697ad7d3..e16d56734 100644
--- a/Library/Formula/opencv.rb
+++ b/Library/Formula/opencv.rb
@@ -21,8 +21,14 @@ class Opencv <Formula
# you don't need unless you're doing video analysis, and some of it isn't
# in Homebrew anyway.
+ def options
+ [['--build32', 'Force a 32-bit build.']]
+ end
+
def install
- system "cmake -G 'Unix Makefiles' -DCMAKE_INSTALL_PREFIX:PATH=#{prefix} ."
+ makefiles = "cmake -G 'Unix Makefiles' -DCMAKE_INSTALL_PREFIX:PATH=#{prefix} ."
+ makefiles += " -DOPENCV_EXTRA_C_FLAGS='-arch i386 -m32'" if ARGV.include? '--build32'
+ system makefiles
system "make"
system "make install"
end