-
Notifications
You must be signed in to change notification settings - Fork 14
/
Build.OpenCV.bat
147 lines (144 loc) · 4.05 KB
/
Build.OpenCV.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
SET OPENCV_OPTIONS=^
-DOPENCV_FORCE_3RDPARTY_BUILD:BOOL=ON ^
-DBUILD_CUDA_STUBS:BOOL=OFF ^
-DBUILD_DOCS:BOOL=OFF ^
-DBUILD_EXAMPLES:BOOL=OFF ^
-DBUILD_FAT_JAVA_LIB:BOOL=OFF ^
-DBUILD_IPP_IW:BOOL=OFF ^
-DBUILD_ITT:BOOL=OFF ^
-DBUILD_JASPER:BOOL=OFF ^
-DBUILD_JAVA:BOOL=OFF ^
-DBUILD_JPEG:BOOL=OFF ^
-DBUILD_LIST:STRING= ^
-DBUILD_OPENEXR:BOOL=OFF ^
-DBUILD_OPENJPEG:BOOL=OFF ^
-DBUILD_PACKAGE:BOOL=OFF ^
-DBUILD_PERF_TESTS:BOOL=OFF ^
-DBUILD_PNG:BOOL=ON ^
-DBUILD_PROTOBUF:BOOL=OFF ^
-DBUILD_SHARED_LIBS:BOOL=OFF ^
-DBUILD_TBB:BOOL=OFF ^
-DBUILD_TESTS:BOOL=OFF ^
-DBUILD_TIFF:BOOL=OFF ^
-DBUILD_USE_SYMLINKS:BOOL=OFF ^
-DBUILD_WEBP:BOOL=OFF ^
-DBUILD_WITH_DEBUG_INFO:BOOL=OFF ^
-DBUILD_WITH_DYNAMIC_IPP:BOOL=OFF ^
-DBUILD_WITH_STATIC_CRT:BOOL=ON ^
-DBUILD_ZLIB:BOOL=ON ^
-DBUILD_opencv_apps:BOOL=OFF ^
-DBUILD_opencv_calib3d:BOOL=OFF ^
-DBUILD_opencv_core:BOOL=ON ^
-DBUILD_opencv_dnn:BOOL=OFF ^
-DBUILD_opencv_features2d:BOOL=OFF ^
-DBUILD_opencv_flann:BOOL=OFF ^
-DBUILD_opencv_gapi:BOOL=OFF ^
-DBUILD_opencv_highgui:BOOL=OFF ^
-DBUILD_opencv_imgcodecs:BOOL=ON ^
-DBUILD_opencv_imgproc:BOOL=ON ^
-DBUILD_opencv_java_bindings_generator:BOOL=OFF ^
-DBUILD_opencv_js:BOOL=OFF ^
-DBUILD_opencv_ml:BOOL=OFF ^
-DBUILD_opencv_objdetect:BOOL=OFF ^
-DBUILD_opencv_photo:BOOL=OFF ^
-DBUILD_opencv_python_bindings_generator:BOOL=OFF ^
-DBUILD_opencv_python_tests:BOOL=OFF ^
-DBUILD_opencv_stitching:BOOL=OFF ^
-DBUILD_opencv_ts:BOOL=OFF ^
-DBUILD_opencv_video:BOOL=OFF ^
-DBUILD_opencv_videoio:BOOL=OFF ^
-DBUILD_opencv_world:BOOL=OFF ^
-DENABLE_BUILD_HARDENING:BOOL=OFF ^
-DENABLE_CCACHE:BOOL=OFF ^
-DENABLE_CONFIG_VERIFICATION:BOOL=OFF ^
-DENABLE_FAST_MATH:BOOL=OFF ^
-DENABLE_FLAKE8:BOOL=OFF ^
-DENABLE_IMPL_COLLECTION:BOOL=OFF ^
-DENABLE_INSTRUMENTATION:BOOL=OFF ^
-DENABLE_LTO:BOOL=OFF ^
-DENABLE_NOISY_WARNINGS:BOOL=OFF ^
-DENABLE_PIC:BOOL=ON ^
-DENABLE_PRECOMPILED_HEADERS:BOOL=ON ^
-DENABLE_PYLINT:BOOL=OFF ^
-DENABLE_SOLUTION_FOLDERS:BOOL=ON ^
-DWITH_1394:BOOL=OFF ^
-DWITH_ADE:BOOL=OFF ^
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=OFF ^
-DWITH_PNG:BOOL=ON ^
-DWITH_PROTOBUF:BOOL=OFF ^
-DWITH_PVAPI:BOOL=OFF ^
-DWITH_QT:BOOL=OFF ^
-DWITH_QUIRC:BOOL=OFF ^
-DWITH_TBB:BOOL=OFF ^
-DWITH_TIFF:BOOL=OFF ^
-DWITH_VTK:BOOL=OFF ^
-DWITH_VULKAN:BOOL=OFF ^
-DWITH_WEBP:BOOL=OFF ^
-DWITH_WIN32UI:BOOL=OFF ^
-DWITH_XIMEA:BOOL=OFF
SET ROOTPATH=%CD%
cd opencv-4.5.2
mkdir build32w
cd build32w
SET INSTALL_PATH=%ROOTPATH%/opencv-x32
cmake %OPENCV_OPTIONS% ^
-DOPENCV_LIB_ARCHIVE_INSTALL_PATH:PATH=%INSTALL_PATH% ^
-DOPENCV_3P_LIB_INSTALL_PATH:PATH=%INSTALL_PATH% ^
-DOPENCV_INCLUDE_INSTALL_PATH=%INSTALL_PATH% ^
.. -A Win32
cmake --build . --config Release
cmake --build . --target install --config Release
cd %ROOTPATH%
cd opencv-4.5.2
mkdir build64w
cd build64w
SET INSTALL_PATH=%ROOTPATH%/opencv-x64
cmake %OPENCV_OPTIONS% ^
-DOPENCV_LIB_ARCHIVE_INSTALL_PATH:PATH=%INSTALL_PATH% ^
-DOPENCV_3P_LIB_INSTALL_PATH:PATH=%INSTALL_PATH% ^
-DOPENCV_INCLUDE_INSTALL_PATH=%INSTALL_PATH% ^
.. -A x64
cmake --build . --config Release
cmake --build . --target install --config Release
cd %ROOTPATH%