-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure_opencv.ps1
153 lines (146 loc) · 6.01 KB
/
configure_opencv.ps1
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
148
149
150
151
152
153
#Requires -Version 7.0
function Get-ScriptDirectory {
Split-Path -parent $PSCommandPath
}
$location = Get-ScriptDirectory
$source = "$location/opencv"
$build = ""
if ($IsWindows)
{
$build = "$location/opencv-build"
}
if ($IsLinux)
{
$build = "$location/opencv-build-gcc"
}
$install_prefix = "$build/install"
$cmake_args = "-S$source -B$build "
$cmake_args += "-DENABLE_LIBJPEG_TURBO_SIMD:BOOL=0 "
$cmake_args += "-Dpackbits:BOOL=0 "
$cmake_args += "-DWITH_CUDA:BOOL=0 "
$cmake_args += "-DBUILD_opencv_plot:BOOL=0 "
$cmake_args += "-DBUILD_opencv_phase_unwrapping:BOOL=0 "
$cmake_args += "-DOPENCV_ENABLE_ALLOCATOR_STATS:BOOL=0 "
$cmake_args += "-DBUILD_opencv_dnn_objdetect:BOOL=0 "
$cmake_args += "-DBUILD_PROTOBUF:BOOL=0 "
$cmake_args += "-DBUILD_opencv_python_bindings_generator:BOOL=0 "
$cmake_args += "-DBUILD_opencv_js_bindings_generator:BOOL=0 "
$cmake_args += "-DBUILD_opencv_optflow:BOOL=0 "
$cmake_args += "-DBUILD_PERF_TESTS:BOOL=0 "
$cmake_args += "-DBUILD_opencv_bgsegm:BOOL=0 "
$cmake_args += "-DBUILD_opencv_features2d:BOOL=1 "
$cmake_args += "-DOPENCV_EXTRA_MODULES_PATH:PATH=../opencv_contrib/modules "
$cmake_args += "-DBUILD_LIST:STRING= "
$cmake_args += "-DWITH_IMGCODEC_PFM:BOOL=0 "
$cmake_args += "-DBUILD_ZLIB:BOOL=1 "
$cmake_args += "-DWITH_IMGCODEC_HDR:BOOL=0 "
$cmake_args += "-DWITH_TESSERACT:BOOL=0 "
$cmake_args += "-DBUILD_opencv_photo:BOOL=0 "
$cmake_args += "-DBUILD_opencv_dpm:BOOL=0 "
$cmake_args += "-DBUILD_WEBP:BOOL=0 "
$cmake_args += "-DBUILD_opencv_saliency:BOOL=0 "
$cmake_args += "-DBUILD_opencv_fuzzy:BOOL=0 "
$cmake_args += "-DBUILD_opencv_ccalib:BOOL=0 "
$cmake_args += "-DWITH_JASPER:BOOL=0 "
$cmake_args += "-Dlogluv:BOOL=0 "
$cmake_args += "-DBUILD_opencv_datasets:BOOL=0 "
$cmake_args += "-DBUILD_opencv_intensity_transform:BOOL=0 "
$cmake_args += "-DBUILD_SHARED_LIBS:BOOL=0 "
$cmake_args += "-DBUILD_TIFF:BOOL=0 "
$cmake_args += "-DWITH_IPP:BOOL=0 "
$cmake_args += "-DBUILD_opencv_video:BOOL=1 "
$cmake_args += "-DBUILD_opencv_face:BOOL=0 "
$cmake_args += "-DBUILD_opencv_structured_light:BOOL=0 "
$cmake_args += "-DBUILD_opencv_img_hash:BOOL=0 "
$cmake_args += "-DBUILD_opencv_hfs:BOOL=0 "
$cmake_args += "-DWITH_ARITH_ENC:BOOL=0 "
$cmake_args += "-DENABLE_INSTRUMENTATION:BOOL=0 "
$cmake_args += "-DBUILD_opencv_tracking:BOOL=0 "
$cmake_args += "-DBUILD_opencv_xfeatures2d:BOOL=0 "
$cmake_args += "-DBUILD_opencv_xobjdetect:BOOL=0 "
$cmake_args += "-DENABLE_PIC:BOOL=1 "
$cmake_args += "-DWITH_CLP:BOOL=0 "
$cmake_args += "-DBUILD_opencv_mcc:BOOL=0 "
$cmake_args += "-DWITH_OPENCL_D3D11_NV:BOOL=0 "
$cmake_args += "-DWITH_OPENCLAMDBLAS:BOOL=0 "
$cmake_args += "-DBUILD_opencv_reg:BOOL=0 "
$cmake_args += "-DWITH_VTK:BOOL=0 "
$cmake_args += "-DBUILD_opencv_java_bindings_generator:BOOL=0 "
$cmake_args += "-DWITH_OPENJPEG:BOOL=0 "
$cmake_args += "-Dnext:BOOL=0 "
$cmake_args += "-DWITH_OPENEXR:BOOL=0 "
$cmake_args += "-DBUILD_opencv_stitching:BOOL=0 "
$cmake_args += "-DWITH_TIFF:BOOL=0 "
$cmake_args += "-DBUILD_opencv_superres:BOOL=0 "
$cmake_args += "-DBUILD_opencv_line_descriptor:BOOL=0 "
$cmake_args += "-DWITH_IMGCODEC_SUNRASTER:BOOL=0 "
$cmake_args += "-DBUILD_IPP_IW:BOOL=0 "
$cmake_args += "-DBUILD_opencv_surface_matching:BOOL=0 "
$cmake_args += "-DWITH_WIN32UI:BOOL=0 "
$cmake_args += "-DWITH_PROTOBUF:BOOL=0 "
$cmake_args += "-DWITH_OPENCLAMDFFT:BOOL=0 "
$cmake_args += "-Dccitt:BOOL=0 "
$cmake_args += "-DBUILD_JPEG:BOOL=0 "
$cmake_args += "-DWITH_DSHOW:BOOL=0 "
$cmake_args += "-DBUILD_opencv_barcode:BOOL=0 "
$cmake_args += "-DBUILD_JAVA:BOOL=0 "
$cmake_args += "-DBUILD_opencv_rapid:BOOL=0 "
$cmake_args += "-DWITH_OPENCL:BOOL=0 "
$cmake_args += "-DOPENCV_DNN_OPENCL:BOOL=0 "
$cmake_args += "-DBUILD_opencv_calib3d:BOOL=1 "
$cmake_args += "-DBUILD_opencv_highgui:BOOL=0 "
$cmake_args += "-DBUILD_opencv_dnn_superres:BOOL=0 "
$cmake_args += "-DWITH_FFMPEG:BOOL=0 "
$cmake_args += "-DWITH_IMGCODEC_PXM:BOOL=0 "
$cmake_args += "-DWITH_WEBP:BOOL=0 "
$cmake_args += "-DBUILD_opencv_ml:BOOL=0 "
$cmake_args += "-DBUILD_ITT:BOOL=0 "
$cmake_args += "-DBUILD_opencv_videostab:BOOL=0 "
$cmake_args += "-DBUILD_opencv_text:BOOL=0 "
$cmake_args += "-DBUILD_opencv_objdetect:BOOL=0 "
$cmake_args += "-DBUILD_opencv_flann:BOOL=1 "
$cmake_args += "-DWITH_MSMF_DXVA:BOOL=0 "
$cmake_args += "-DBUILD_opencv_core:BOOL=1 "
$cmake_args += "-DWITH_LIBREALSENSE:BOOL=0 "
$cmake_args += "-DWITH_MSMF:BOOL=0 "
$cmake_args += "-DWITH_QUIRC:BOOL=0 "
$cmake_args += "-DBUILD_opencv_quality:BOOL=0 "
$cmake_args += "-DOPENCL_FOUND:BOOL=0 "
$cmake_args += "-DBUILD_opencv_ts:BOOL=0 "
$cmake_args += "-DBUILD_opencv_objc_bindings_generator:BOOL=0 "
$cmake_args += "-DWITH_ITT:BOOL=0 "
$cmake_args += "-DBUILD_PACKAGE:BOOL=0 "
$cmake_args += "-DWITH_OBSENSOR:BOOL=0 "
$cmake_args += "-DBUILD_opencv_shape:BOOL=0 "
$cmake_args += "-DBUILD_opencv_apps:BOOL=0 "
$cmake_args += "-DBUILD_opencv_stereo:BOOL=0 "
$cmake_args += "-DWITH_ARITH_DEC:BOOL=0 "
$cmake_args += "-DBUILD_TESTS:BOOL=0 "
$cmake_args += "-DBUILD_opencv_bioinspired:BOOL=0 "
$cmake_args += "-DWITH_EIGEN:BOOL=0 "
$cmake_args += "-DBUILD_opencv_gapi:BOOL=0 "
$cmake_args += "-DBUILD_opencv_videoio:BOOL=0 "
$cmake_args += "-DCPU_DISPATCH:STRING= "
$cmake_args += "-DWITH_1394:BOOL=0 "
$cmake_args += "-DWITH_MFX:BOOL=0 "
$cmake_args += "-DBUILD_OPENJPEG:BOOL=0 "
$cmake_args += "-DWITH_ADE:BOOL=0 "
$cmake_args += "-DCMAKE_BUILD_TYPE:STRING=Release "
$cmake_args += "-DCPU_BASELINE:STRING=SSE3 "
$cmake_args += "-DWITH_GSTREAMER:BOOL=0 "
$cmake_args += "-Dmdi:BOOL=0 "
$cmake_args += "-DWITH_LAPACK:BOOL=0 "
$cmake_args += "-DBUILD_JASPER:BOOL=0 "
$cmake_args += "-DBUILD_opencv_dnn:BOOL=0 "
$cmake_args += "-Dlzw:BOOL=0 "
$cmake_args += "-DBUILD_opencv_wechat_qrcode:BOOL=0 "
$cmake_args += "-DWITH_DIRECTX:BOOL=0 "
$cmake_args += "-DBUILD_opencv_python_tests:BOOL=0 "
$cmake_args += "-DBUILD_opencv_rgbd:BOOL=0 "
$cmake_args += "-DWITH_JPEG:BOOL=0 "
$cmake_args += "-DBUILD_WITH_STATIC_CRT:BOOL=0 "
$cmake_args += "-DBUILD_opencv_aruco:BOOL=0 "
$cmake_args += "-Dthunder:BOOL=0 "
$cmake_args += "-DBUILD_opencv_xphoto:BOOL=0 "
$cmake_args += "-DCMAKE_INSTALL_PREFIX:STRING=$install_prefix "
Invoke-Expression "cmake $cmake_args"