How to compile OpenCV with extra modules on OS X?
问题 I've previously compiled OpenCV 3.0 successfully following this guide, which essentially consists of the following steps: Download all the prerequisites (XCode, Command Line Tools, CMake and OpenCV source) Build static libs by configuring CMake (via gui) with: Uncheck BUILD_SHARED_LIBS Uncheck BUILD_TESTS Add an SDK path to CMAKE_OSX_SYSROOT (if it matters, I used /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk ). Add x86_64 to CMAKE_OSX