未验证 提交 5564e1e6 编写于 作者: M MissPenguin 提交者: GitHub

Merge pull request #3913 from MissPenguin/dygraph

refine opencv build
...@@ -90,40 +90,44 @@ if [ ${MODE} = "cpp_infer" ];then ...@@ -90,40 +90,44 @@ if [ ${MODE} = "cpp_infer" ];then
cd deploy/cpp_infer cd deploy/cpp_infer
use_opencv=$(func_parser_value "${lines[52]}") use_opencv=$(func_parser_value "${lines[52]}")
if [ ${use_opencv} = "True" ]; then if [ ${use_opencv} = "True" ]; then
echo "################### build opencv ###################" if [ -d "opencv-3.4.7/opencv3/" ] && [ $(md5sum opencv-3.4.7.tar.gz | awk -F ' ' '{print $1}') = "faa2b5950f8bee3f03118e600c74746a" ];then
rm -rf 3.4.7.tar.gz opencv-3.4.7/ echo "################### build opencv skipped ###################"
wget https://github.com/opencv/opencv/archive/3.4.7.tar.gz else
tar -xf 3.4.7.tar.gz echo "################### build opencv ###################"
rm -rf opencv-3.4.7.tar.gz opencv-3.4.7/
wget https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/opencv-3.4.7.tar.gz
tar -xf opencv-3.4.7.tar.gz
cd opencv-3.4.7/ cd opencv-3.4.7/
install_path=$(pwd)/opencv-3.4.7/opencv3 install_path=$(pwd)/opencv3
rm -rf build rm -rf build
mkdir build mkdir build
cd build cd build
cmake .. \ cmake .. \
-DCMAKE_INSTALL_PREFIX=${install_path} \ -DCMAKE_INSTALL_PREFIX=${install_path} \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF \ -DBUILD_SHARED_LIBS=OFF \
-DWITH_IPP=OFF \ -DWITH_IPP=OFF \
-DBUILD_IPP_IW=OFF \ -DBUILD_IPP_IW=OFF \
-DWITH_LAPACK=OFF \ -DWITH_LAPACK=OFF \
-DWITH_EIGEN=OFF \ -DWITH_EIGEN=OFF \
-DCMAKE_INSTALL_LIBDIR=lib64 \ -DCMAKE_INSTALL_LIBDIR=lib64 \
-DWITH_ZLIB=ON \ -DWITH_ZLIB=ON \
-DBUILD_ZLIB=ON \ -DBUILD_ZLIB=ON \
-DWITH_JPEG=ON \ -DWITH_JPEG=ON \
-DBUILD_JPEG=ON \ -DBUILD_JPEG=ON \
-DWITH_PNG=ON \ -DWITH_PNG=ON \
-DBUILD_PNG=ON \ -DBUILD_PNG=ON \
-DWITH_TIFF=ON \ -DWITH_TIFF=ON \
-DBUILD_TIFF=ON -DBUILD_TIFF=ON
make -j make -j
make install make install
cd ../ cd ../
echo "################### build opencv finished ###################" echo "################### build opencv finished ###################"
fi
fi fi
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册