Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update OpenCV version #5629

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -394,8 +394,8 @@ http_archive(
http_archive(
name = "opencv",
build_file_content = all_content,
strip_prefix = "opencv-3.4.10",
urls = ["https://github.com/opencv/opencv/archive/3.4.10.tar.gz"],
strip_prefix = "opencv-4.7.0",
urls = ["https://github.com/opencv/opencv/archive/4.7.0.tar.gz"],
)

new_local_repository(
Expand Down
5 changes: 4 additions & 1 deletion third_party/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ bzl_library(
# linker, so if library A depends on library B, library B must come _after_.
# Hence core is at the bottom.
OPENCV_MODULES = [
"flann",
"calib3d",
"features2d",
"highgui",
Expand All @@ -149,14 +150,15 @@ OPENCV_MODULES = [
# to switch to static libraries.
OPENCV_SHARED_LIBS = True

OPENCV_SO_VERSION = "3.4"
OPENCV_SO_VERSION = "407"

cmake(
name = "opencv_cmake",
# Values to be passed as -Dkey=value on the CMake command line;
# here are serving to provide some CMake script configuration options
cache_entries = {
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_INSTALL_LIBDIR": "lib",
# The module list is always sorted alphabetically so that we do not
# cause a rebuild when changing the link order.
"BUILD_LIST": ",".join(sorted(OPENCV_MODULES)),
Expand Down Expand Up @@ -227,6 +229,7 @@ cmake(
"-lpthread",
"-lrt",
],
out_include_dir = "include/opencv4",
out_shared_libs = select({
"@bazel_tools//src/conditions:darwin": ["libopencv_%s.%s.dylib" % (module, OPENCV_SO_VERSION) for module in OPENCV_MODULES],
# Only the shared objects listed here will be linked in the directory
Expand Down