OpenCV debug and optimized build in separate config_setting
This commit is contained in:
parent
a92cff7a60
commit
9abce18c37
24
third_party/opencv_windows.BUILD
vendored
24
third_party/opencv_windows.BUILD
vendored
|
@ -12,12 +12,28 @@ OPENCV_VERSION = "3410" # 3.4.10
|
||||||
# If you install OpenCV separately, please modify the build rule accordingly.
|
# If you install OpenCV separately, please modify the build rule accordingly.
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "opencv",
|
name = "opencv",
|
||||||
srcs = [
|
srcs = select({
|
||||||
"x64/vc15/lib/opencv_world" + OPENCV_VERSION + ".lib",
|
":opt_build": [
|
||||||
"x64/vc15/bin/opencv_world" + OPENCV_VERSION + ".dll",
|
"x64/vc15/lib/opencv_world" + OPENCV_VERSION + ".lib",
|
||||||
],
|
"x64/vc15/bin/opencv_world" + OPENCV_VERSION + ".dll",
|
||||||
|
],
|
||||||
|
":dbg_build": [
|
||||||
|
"x64/vc15/lib/opencv_world" + OPENCV_VERSION + "d.lib",
|
||||||
|
"x64/vc15/bin/opencv_world" + OPENCV_VERSION + "d.dll",
|
||||||
|
],
|
||||||
|
}),
|
||||||
hdrs = glob(["include/opencv2/**/*.h*"]),
|
hdrs = glob(["include/opencv2/**/*.h*"]),
|
||||||
includes = ["include/"],
|
includes = ["include/"],
|
||||||
linkstatic = 1,
|
linkstatic = 1,
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
config_setting(
|
||||||
|
name = "opt_build",
|
||||||
|
values = {"compilation_mode": "opt"},
|
||||||
|
)
|
||||||
|
|
||||||
|
config_setting(
|
||||||
|
name = "dbg_build",
|
||||||
|
values = {"compilation_mode": "dbg"},
|
||||||
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user