forked from ApolloAuto/apollo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopencv2.BUILD
251 lines (238 loc) · 8.56 KB
/
opencv2.BUILD
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
cc_library(
name = "dynamicuda",
hdrs = glob([
"modules/dynamicuda/include/**/*.hpp",
]),
includes = [
"modules/dynamicuda/include",
],
)
cc_library(
name = "core",
srcs = glob(["modules/core/src/**/*.cpp"]),
hdrs = glob([
"modules/core/src/**/*.hpp",
"modules/core/include/**/*.hpp",
]) + [
":module_includes",
":cvconfig",
":version_string",
],
copts = [
"-Imodules/dynamicuda/include",
],
includes = [
"modules/core/include",
],
# Note that opencv core requires zlib and pthread to build.
linkopts = [
"-pthread",
"-lz",
],
visibility = ["//visibility:public"],
deps = [
":dynamicuda",
],
)
cc_library(
name = "imgproc",
srcs = glob(["modules/imgproc/src/**/*.cpp"]),
hdrs = glob([
"modules/imgproc/src/**/*.hpp",
"modules/imgproc/src/**/*.h",
"modules/imgproc/include/**/*.hpp",
"modules/imgproc/include/**/*.h",
]) + [
":module_includes",
],
includes = [
"modules/imgproc/include",
],
visibility = ["//visibility:public"],
deps = [
":core",
],
)
cc_library(
name = "ml",
srcs = glob(["modules/ml/src/**/*.cpp"]),
hdrs = glob([
"modules/ml/src/**/*.hpp",
"modules/ml/src/**/*.h",
"modules/ml/include/**/*.hpp",
"modules/ml/include/**/*.h",
]) + [
":module_includes",
],
includes = [
"modules/ml/include",
],
visibility = ["//visibility:public"],
deps = [
":core",
],
)
cc_library(
name = "video",
srcs = glob(["modules/video/src/**/*.cpp"]),
hdrs = glob([
"modules/video/src/**/*.hpp",
"modules/video/src/**/*.h",
"modules/video/include/**/*.hpp",
"modules/video/include/**/*.h",
]) + [
":module_includes",
],
includes = [
"modules/video/include",
],
visibility = ["//visibility:public"],
deps = [
":core",
],
)
genrule(
name = "module_includes",
outs = ["opencv2/opencv_modules.hpp"],
cmd = """
cat > $@ <<"EOF"
#define HAVE_OPENCV_CORE
#define HAVE_OPENCV_IMGPROC
#define HAVE_OPENCV_ML
EOF""",
)
genrule(
name = "cvconfig",
outs = ["cvconfig.h"],
cmd = """
cat > $@ <<"EOF"
// JPEG-2000
#define HAVE_JASPER
// IJG JPEG
#define HAVE_JPEG
// PNG
#define HAVE_PNG
// TIFF
#define HAVE_TIFF
// Compile for 'real' NVIDIA GPU architectures
#define CUDA_ARCH_BIN ""
// NVIDIA GPU features are used
#define CUDA_ARCH_FEATURES ""
// Compile for 'virtual' NVIDIA PTX architectures
#define CUDA_ARCH_PTX ""
EOF""",
)
genrule(
name = "version_string",
outs = ["version_string.inc"],
cmd = """
cat > $@ <<"EOF"
"\\n"
"General configuration for OpenCV 2.4.13.2 =====================================\\n"
" Version control: unknown\\n"
"\\n"
" Platform:\\n"
" Host: Linux 4.4.0-53-generic x86_64\\n"
" CMake: 3.5.1\\n"
" CMake generator: Unix Makefiles\\n"
" CMake build tool: /usr/bin/make\\n"
" Configuration: Release\\n"
"\\n"
" C/C++:\\n"
" Built as dynamic libs?: YES\\n"
" C++ Compiler: /usr/bin/c++ (ver 5.4.0)\\n"
" C++ flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -Wno-array-bounds -Wno-aggressive-loop-optimizations -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -O3 -DNDEBUG -DNDEBUG\\n"
" C++ flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -Wno-array-bounds -Wno-aggressive-loop-optimizations -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -g -O0 -DDEBUG -D_DEBUG\\n"
" C Compiler: /usr/bin/cc\\n"
" C flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -Wno-comment -Wno-array-bounds -Wno-aggressive-loop-optimizations -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -O3 -DNDEBUG -DNDEBUG\\n"
" C flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -Wno-comment -Wno-array-bounds -Wno-aggressive-loop-optimizations -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -g -O0 -DDEBUG -D_DEBUG\\n"
" Linker flags (Release):\\n"
" Linker flags (Debug):\\n"
" ccache: YES\\n"
" Precompiled headers: NO\\n"
"\\n"
" OpenCV modules:\\n"
" To be built: core flann imgproc highgui features2d calib3d ml video legacy objdetect photo gpu ocl nonfree contrib stitching superres ts videostab\\n"
" Disabled: world\\n"
" Disabled by dependency: -\\n"
" Unavailable: androidcamera dynamicuda java python viz\\n"
"\\n"
" GUI: \\n"
" QT: NO\\n"
" GTK+ 2.x: NO\\n"
" GThread : NO\\n"
" GtkGlExt: NO\\n"
" OpenGL support: NO\\n"
" VTK support: NO\\n"
"\\n"
" Media I/O: \\n"
" ZLib: /usr/lib/x86_64-linux-gnu/libz.so (ver 1.2.8)\\n"
" JPEG: libjpeg (ver 62)\\n"
" PNG: build (ver 1.5.27)\\n"
" TIFF: build (ver 42 - 4.0.2)\\n"
" JPEG 2000: build (ver 1.900.1)\\n"
" OpenEXR: build (ver 1.7.1)\\n"
"\\n"
" Video I/O:\\n"
" DC1394 1.x: NO\\n"
" DC1394 2.x: NO\\n"
" FFMPEG: NO\\n"
" avcodec: NO\\n"
" avformat: NO\\n"
" avutil: NO\\n"
" swscale: NO\\n"
" avresample: NO\\n"
" GStreamer: NO\\n"
" OpenNI: NO\\n"
" OpenNI PrimeSensor Modules: NO\\n"
" PvAPI: NO\\n"
" GigEVisionSDK: NO\\n"
" UniCap: NO\\n"
" UniCap ucil: NO\\n"
" V4L/V4L2: NO/YES\\n"
" XIMEA: NO\\n"
" Xine: NO\\n"
"\\n"
" Other third-party libraries:\\n"
" Use IPP: NO\\n"
" Use Eigen: YES (ver 3.2.92)\\n"
" Use TBB: NO\\n"
" Use OpenMP: NO\\n"
" Use GCD NO\\n"
" Use Concurrency NO\\n"
" Use C=: NO\\n"
" Use Cuda: NO\\n"
" Use OpenCL: YES\\n"
"\\n"
" OpenCL:\\n"
" Version: dynamic\\n"
" Include path: /home/breakds/Downloads/opencv-2.4.13.2/3rdparty/include/opencl/1.2\\n"
" Use AMD FFT: NO\\n"
" Use AMD BLAS: NO\\n"
"\\n"
" Python:\\n"
" Interpreter: /usr/bin/python2 (ver 2.7.12)\\n"
"\\n"
" Java:\\n"
" ant: NO\\n"
" JNI: NO\\n"
" Java tests: NO\\n"
"\\n"
" Documentation:\\n"
" Build Documentation: NO\\n"
" Sphinx: NO\\n"
" PdfLaTeX compiler: NO\\n"
" Doxygen: NO\\n"
"\\n"
" Tests and samples:\\n"
" Tests: YES\\n"
" Performance tests: YES\\n"
" C/C++ Examples: NO\\n"
"\\n"
" Install path: /usr/local\\n"
"\\n"
" cvconfig.h is in: /home/breakds/Downloads/opencv-2.4.13.2/build\\n"
"-----------------------------------------------------------------\\n"
"\\n"
EOF""",
)