update: | opencv opencv_contrib |
cd opencv/ && git pull origin master |
cd opencv_contrib/ && git pull origin master |
sudo apt-get install -y cmake git checkinstall build-essential libdc1394-22-dev libv4l-dev libavcodec-dev libavutil-dev libavformat-dev libavutil-dev libswscale-dev libx264-dev libeigen3-dev libgtk2.0-dev libgstreamer1.0-dev libgstreamer-vaapi1.0-dev libtbb-dev libgtkglext1 libilmbase-dev libjasper-dev libjbig-dev liblzma-dev libopenexr-dev libtiff5-dev libtiffxx5 |
sudo apt-get install -y libqt4-dev libqt4-opengl-dev |
git clone https://github.com/itseez/opencv_contrib.git |
git clone https://github.com/itseez/opencv.git |
cd opencv && git checkout 3.0.0-beta |
opencv/release/Makefile: | opencv/release opencv_contrib |
make clean #necessary to make sure old configuration files are not present |
cd opencv/release/; cmake -D CMAKE_BUILD_TYPE=RELEASE -DOPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules $(options) .. |
opencv/release/lib/libopencv_core.so: build |
build: opencv/release/Makefile |
make -C opencv/release -j $$(( $$(nproc) - 1 )) -l $$(nproc) |
opencv.deb: opencv/release/lib/libopencv_core.so |
echo "OpenCV library compiled from git repository along with the contrib" > description-pak |
sudo checkinstall --install=no --maintainer="$(USER)" --nodoc --pkgname="opencv" --provides="opencv" --deldesc=yes --delspec=yes --backup=no --fstrans=yes --default\ |
--requires="libdc1394-22-dev,libv4l-dev,libavcodec-dev,libavutil-dev,libavformat-dev,libavutil-dev,libswscale-dev,libx264-dev,libeigen3-dev,libgtk2.0-dev,libgstreamer1.0-dev,libgstreamer-vaapi1.0-dev,libtbb-dev,libfaac0,libgtkglext1,libilmbase-dev,libjasper-dev,libjbig-dev,liblzma-dev,libopenexr-dev,libtiff5-dev,libtiffxx5"\ |
--replaces="libopencv-dev"\ |
make -C $(PWD)/opencv/release/ install |
sudo mv opencv_*_*.deb opencv.deb |
rm -rf opencv/ opencv_contrib/ |
.PHONY: dep-graphic clean mrproper uninstall
源码地址:
https://github.com/Yougmark/opencv_gpu_benchmark/blob/master/Makefile
文章来源: blog.csdn.net,作者:网奇,版权归原作者所有,如需转载,请联系作者。
原文链接:blog.csdn.net/jacke121/article/details/56280621
【版权声明】本文为华为云社区用户转载文章,如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱:
cloudbbs@huaweicloud.com
评论(0)