Skip to content

Instantly share code, notes, and snippets.

@dennda
Created July 30, 2010 17:48
Show Gist options
  • Save dennda/500986 to your computer and use it in GitHub Desktop.
Save dennda/500986 to your computer and use it in GitHub Desktop.
diff --git a/Library/Formula/opencv.rb b/Library/Formula/opencv.rb
index 8249202..94da337 100644
--- a/Library/Formula/opencv.rb
+++ b/Library/Formula/opencv.rb
@@ -22,7 +22,9 @@ class Opencv <Formula
# There are other optional dependencies but they don't currently exist in Homebrew.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment