Skip to content

Instantly share code, notes, and snippets.

@garybradski
Last active September 5, 2020 00:31
Show Gist options
  • Save garybradski/04e81b3d5869769efc63fe7e8b6e23c3 to your computer and use it in GitHub Desktop.
Save garybradski/04e81b3d5869769efc63fe7e8b6e23c3 to your computer and use it in GitHub Desktop.
Build OpenCV on a Mac with XCode
Building OpenCV on Mac with Xcode
1. make sure you have all the updates installed, latest Xcode, latest CMake.
2. run Xcode, if it suggest to install some developer tools on launch, do it. Then quit it.
3. in terminal run "sudo xcode-select --reset" 
4. wipe opencv build directory.
5. run CMake (or cmake-gui&), select opencv source directory and fresh build directory.
6. select Xcode project generator, I tried Unix, it may not work similarly well. Just use Xcode, you can still build it from command line.
7. add OPENCV_EXTRA_MODULES_PATH directory set to opencv_contrib/modules.
8. configure => generate => open project.
9. build all.
10. done!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment