build_opencv.sh 617 B

12345678910111213141516171819202122232425262728
  1. root_path="/paddle/PaddleOCR/deploy/cpp_infer/opencv-3.4.7"
  2. install_path=${root_path}/opencv3
  3. build_dir=${root_path}/build
  4. rm -rf ${build_dir}
  5. mkdir ${build_dir}
  6. cd ${build_dir}
  7. cmake .. \
  8. -DCMAKE_INSTALL_PREFIX=${install_path} \
  9. -DCMAKE_BUILD_TYPE=Release \
  10. -DBUILD_SHARED_LIBS=OFF \
  11. -DWITH_IPP=OFF \
  12. -DBUILD_IPP_IW=OFF \
  13. -DWITH_LAPACK=OFF \
  14. -DWITH_EIGEN=OFF \
  15. -DCMAKE_INSTALL_LIBDIR=lib64 \
  16. -DWITH_ZLIB=ON \
  17. -DBUILD_ZLIB=ON \
  18. -DWITH_JPEG=ON \
  19. -DBUILD_JPEG=ON \
  20. -DWITH_PNG=ON \
  21. -DBUILD_PNG=ON \
  22. -DWITH_TIFF=ON \
  23. -DBUILD_TIFF=ON
  24. make -j
  25. make install