Skip to content

Instantly share code, notes, and snippets.

@scari scari/build.sh
Created Mar 10, 2015

Embed
What would you like to do?
Building OpenCV 3.0 Beta on Mac OS X Yosemite with Anaconda / Python3.
# My configuration.
# I had a trouble with `cuda` so I disabled it.
# Don't forget to change dynamic shared lib install name after the build has finished.
#
# ex:
# $ sudo install_name_tool -change libpython3.4m.dylib ~/anaconda3/lib/libpython3.4m.dylib ~/anaconda3/lib/python3.4/site-packages/cv2.so
ANACONDA=/Users/scari/anaconda3
cmake -Wno-dev -D CMAKE_BUILD_TYPE=RELEASE \
-D BUILD_PERF_TESTS=OFF \
-D BUILD_opencv_core=ON \
-D BUILD_opencv_python2=OFF \
-D BUILD_opencv_python3=ON \
-D BUILD_opencv_cuda=OFF \
-D BUILD_opencv_java=OFF \
-D BUILD_opencv_video=ON \
-D BUILD_opencv_videoio=ON \
-D BUILD_opencv_world=ON \
-D BUILD_opencv_viz=OFF \
-D WITH_CUBLAS=OFF \
-D WITH_CUDA=OFF \
-D WITH_CUFFT=OFF \
-D WITH_FFMPEG=ON \
-D PYTHON3_EXECUTABLE=${ANACONDA}/bin/python3 \
-D PYTHON3_LIBRARY=${ANACONDA}/lib/libpython3.4m.dylib \
-D PYTHON3_INCLUDE_DIR=${ANACONDA}/include/python3.4m \
-D PYTHON3_NUMPY_INCLUDE_DIRS=${ANACONDA}/lib/python3.4/site-packages/numpy/core/include \
-D PYTHON3_PACKAGES_PATH=${ANACONDA}/lib/python3.4/site-packages \
-D CMAKE_OSX_ARCHITECTURES=x86_64 \
-D CMAKE_INSTALL_PREFIX=/usr/local ..
make -j8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.