更新mac和windows的opencv配置

This commit is contained in:
liuyulvv 2022-08-05 11:13:48 +08:00
parent 9636585f39
commit 737e192479
3 changed files with 9 additions and 9 deletions

View File

@ -211,7 +211,7 @@ new_local_repository(
# For local MacOS builds, the path should point to an opencv@3 installation.
# If you edit the path here, you will also need to update the corresponding
# prefix in "opencv_macos.BUILD".
path = "/usr/local",
path = "/opt",
)
new_local_repository(
@ -223,7 +223,7 @@ new_local_repository(
new_local_repository(
name = "windows_opencv",
build_file = "@//third_party:opencv_windows.BUILD",
path = "C:\\opencv\\build",
path = "D:\\opencv\\build",
)
http_archive(

View File

@ -1,15 +1,15 @@
# Description:
# OpenCV libraries for video/image processing on MacOS
load("@bazel_skylib//lib:paths.bzl", "paths")
licenses(["notice"]) # BSD license
exports_files(["LICENSE"])
load("@bazel_skylib//lib:paths.bzl", "paths")
# The path to OpenCV is a combination of the path set for "macos_opencv"
# in the WORKSPACE file and the prefix here.
PREFIX = "opt/opencv@3"
PREFIX = "homebrew"
cc_library(
name = "opencv",
@ -25,8 +25,8 @@ cc_library(
paths.join(PREFIX, "lib/libopencv_videoio.dylib"),
],
),
hdrs = glob([paths.join(PREFIX, "include/opencv2/**/*.h*")]),
includes = [paths.join(PREFIX, "include/")],
hdrs = glob([paths.join(PREFIX, "include/opencv4/opencv2/**/*.h*")]),
includes = [paths.join(PREFIX, "include/opencv4/")],
linkstatic = 1,
visibility = ["//visibility:public"],
)

View File

@ -5,7 +5,7 @@ licenses(["notice"]) # BSD license
exports_files(["LICENSE"])
OPENCV_VERSION = "3410" # 3.4.10
OPENCV_VERSION = "3415" # 3.4.15
config_setting(
name = "opt_build",
@ -17,7 +17,7 @@ config_setting(
values = {"compilation_mode": "dbg"},
)
# The following build rule assumes that the executable "opencv-3.4.10-vc14_vc15.exe"
# The following build rule assumes that the executable "opencv-3.4.15-vc14_vc15.exe"
# is downloaded and the files are extracted to local.
# If you install OpenCV separately, please modify the build rule accordingly.
cc_library(