diff --git a/WORKSPACE b/WORKSPACE index 9b50ff8e3..1d7ced979 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -45,12 +45,13 @@ http_archive( ) http_archive( - name = "rules_foreign_cc", - strip_prefix = "rules_foreign_cc-0.1.0", - url = "https://github.com/bazelbuild/rules_foreign_cc/archive/0.1.0.zip", + name = "rules_foreign_cc", + sha256 = "2a4d07cd64b0719b39a7c12218a3e507672b82a97b98c6a89d38565894cf7c51", + strip_prefix = "rules_foreign_cc-0.9.0", + url = "https://github.com/bazelbuild/rules_foreign_cc/archive/refs/tags/0.9.0.tar.gz", ) -load("@rules_foreign_cc//:workspace_definitions.bzl", "rules_foreign_cc_dependencies") +load("@rules_foreign_cc//foreign_cc:repositories.bzl", "rules_foreign_cc_dependencies") rules_foreign_cc_dependencies() diff --git a/third_party/BUILD b/third_party/BUILD index f6107106d..470b7ff99 100644 --- a/third_party/BUILD +++ b/third_party/BUILD @@ -13,7 +13,7 @@ # limitations under the License. # -load("@rules_foreign_cc//tools/build_defs:cmake.bzl", "cmake_external") +load("@rules_foreign_cc//foreign_cc:cmake.bzl", "cmake") load("@bazel_skylib//:bzl_library.bzl", "bzl_library") licenses(["notice"]) # Apache License 2.0 @@ -154,7 +154,7 @@ OPENCV_SHARED_LIBS = True OPENCV_SO_VERSION = "3.4" -cmake_external( +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 @@ -230,7 +230,7 @@ cmake_external( "-lpthread", "-lrt", ], - shared_libraries = select({ + 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 # that Bazel adds to the RUNPATH of dependent executables. You cannot @@ -238,7 +238,7 @@ cmake_external( # versioned name is the one that the executables actually reference. "//conditions:default": ["libopencv_%s.so.%s" % (module, OPENCV_SO_VERSION) for module in OPENCV_MODULES], }) if OPENCV_SHARED_LIBS else None, - static_libraries = [ + out_static_libs = [ "libopencv_%s.a" % module for module in OPENCV_MODULES ] if not OPENCV_SHARED_LIBS else None,