代码拉取完成,页面将自动刷新
language:
- cpp
dist: trusty
compiler:
- g++
matrix:
include:
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
env:
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
before_install:
- eval "${MATRIX_EVAL}"
- sudo apt-get update
- sudo apt-get update -qq
install:
# OpenCV v3.0.0 install code (modified from orignal source: https://github.com/jayrambhia/Install-OpenCV)
# OpenCV dependencies - Details available at: http://docs.opencv.org/trunk/doc/tutorials/introduction/linux_install/linux_install.html
- sudo apt-get install -y --allow-unauthenticated build-essential
- sudo apt-get install -y --allow-unauthenticated cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
- sudo apt-get install -y --allow-unauthenticated python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev
# Download v3.0.0 .zip file and extract.
- curl -sL https://github.com/opencv/opencv/archive/4.3.0.zip > opencv.zip
- unzip opencv.zip
- cd opencv-4.3.0
# Create a new 'build' folder.
- mkdir build
- cd build
# Set build instructions for Ubuntu distro.
- cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D WITH_TBB=ON \
-D WITH_V4L=ON \
-D BUILD_JAVA=OFF -D BUILD_opencv_java_bindings_generator=OFF -D BUILD_opencv_js=OFF\
-D INSTALL_C_EXAMPLES=OFF -D BUILD_EXAMPLES=OFF \
-D BUILD_TESTS=OFF -D BUILD_PERF_TESTS=OFF -D INSTALL_TESTS=OFF \
-D WITH_QT=OFF \
-D WITH_OPENGL=OFF \
-D BUILD_opencv_apps=OFF \
-D BUILD_opencv_python3=OFF -D BUILD_opencv_python_tests=OFF -D INSTALL_PYTHON_EXAMPLES=OFF -D BUILD_NEW_PYTHON_SUPPORT=OFF -D BUILD_opencv_python_bindings_generator=OFF \
-D CPU_BASELINE=AVX2 -D CPU_DISPATCH=AVX2 ..
# Run 'make' with four threads.
- make -j4
# Install to OS.
- sudo make install
# Add configuration to OpenCV to tell it where the library files are located on the file system (/usr/local/lib)
- sudo sh -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/opencv.conf'
- sudo ldconfig
- echo "OpenCV installed."
# We need to return to the repo "root" folder, so we can then 'cd' into the C++ project folder.
- cd ../../
script:
- cmake .
- make -j4
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。