-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBUILD.bazel
More file actions
115 lines (108 loc) · 2.68 KB
/
BUILD.bazel
File metadata and controls
115 lines (108 loc) · 2.68 KB
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
load("@buildifier_prebuilt//:rules.bzl", "buildifier")
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library", "cc_test")
# bazel run //:buildifier
# .. or warn
buildifier(
name = "buildifier",
exclude_patterns = [
"./bazel-*/*",
"./.git/*",
],
lint_mode = "fix",
)
cc_library(
name = "opencv_release",
srcs = select({
"@platforms//os:linux": glob(
["third_party/opencv/lib/*.so*"],
allow_empty = True,
),
"@platforms//os:macos": glob(
["third_party/opencv/lib/*.dylib"],
allow_empty = True,
),
"@platforms//os:windows": glob(
[
"third_party/opencv/release/x64/vc17/lib/*.lib",
"third_party/opencv/release/x64/vc17/bin/*.dll",
],
allow_empty = True,
),
}),
hdrs = glob(
["third_party/opencv/include/**/*"],
allow_empty = True,
),
includes = ["third_party/opencv/include"],
)
cc_library(
name = "opencv_debug",
srcs = select({
"@platforms//os:linux": glob(
["third_party/opencv/lib_debug/*.so*"],
allow_empty = True,
),
"@platforms//os:macos": glob(
["third_party/opencv/lib_debug/*.dylib"],
allow_empty = True,
),
"@platforms//os:windows": glob(
[
"third_party/opencv/debug/x64/vc17/lib/*.lib",
"third_party/opencv/debug/x64/vc17/bin/*.dll",
],
allow_empty = True,
),
}),
hdrs = glob(
["third_party/opencv/include_debug/**/*"],
allow_empty = True,
),
includes = ["third_party/opencv/include_debug"],
)
config_setting(
name = "debug_build",
values = {"compilation_mode": "dbg"},
)
cc_library(
name = "opencv",
visibility = ["//visibility:public"],
deps = select({
":debug_build": [":opencv_release"],
"//conditions:default": [":opencv_release"],
}),
)
cc_test(
name = "mat_test",
srcs = ["mat_test.cc"],
data = ["testdata"],
deps = [
"//:opencv",
"@absl//absl/strings",
"@bazel_tools//tools/cpp/runfiles",
"@glog",
"@googletest//:gtest_main",
],
)
cc_binary(
name = "hello_main",
srcs = ["hello_main.cc"],
data = [
"//testdata",
],
deps = [
"//calibration:intrinsic",
"//convolution:filters",
"//fft",
"//histograms",
"//keypoints",
"//misc",
"//ml:decision_trees",
"//ml:kmeans",
"//tracking",
"//transformations",
"@absl//absl/strings",
"@gflags",
"@glog",
],
)