Skip to content

Commit

Permalink
cmake templates
Browse files Browse the repository at this point in the history
  • Loading branch information
henryzhuhr committed Aug 22, 2021
1 parent cead47d commit dce542a
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 6 deletions.
9 changes: 3 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@ tools/*
# 3rd-party
3rd-party/*

bin
lib
build
templates/**/bin
templates/**/build
templates/**/lib
**/bin
**/build
**/lib

# Prerequisites
*.d
Expand Down
35 changes: 35 additions & 0 deletions docs/opencv/build-opencv.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
cd opencv-4.5.2

md build

md build\3rdparty\ffmpeg
copy ..\download\*.cmake build\3rdparty\ffmpeg\
copy ..\download\*.dll build\3rdparty\ffmpeg\

md build\downloads\wechat_qrcode
copy ..\download\*.caffemodel build\downloads\wechat_qrcode
copy ..\download\*.prototxt build\downloads\wechat_qrcode

md build\downloads\xfeatures2d\
copy ..\download\*.i build\downloads\xfeatures2d\

md build\testdata\cv\face\
copy ..\download\face_landmark_model.dat build\testdata\cv\face\

cd build

cmake .. ^
-G "MinGW Makefiles" ^
-D CMAKE_INSTALL_PREFIX=C:/Users/Henryzhu/Programs/opencv ^
-D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-4.5.2/modules ^
-D CMAKE_BUILD_TYPE=Release ^
-DBUILD_opencv_python2=OFF ^
-DBUILD_opencv_python3=OFF ^
-D OPENCV_GENERATE_PKGCONFIG=ON ^
-D BUILD_SHARED_LIBS=OFF^
-D WITH_CUDA=ON ^
-D OPENCV_DNN_CUDA=ON ^
-D WITH_ONNX=ON ^
-D WITH_1394=OFF
make -j8
make install
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit dce542a

Please sign in to comment.