Skip to content

Commit

Permalink
Add comments to explain how to configure OpenCV in the opencv_macos.B…
Browse files Browse the repository at this point in the history
…UILD file.

PiperOrigin-RevId: 691204643
  • Loading branch information
schmidt-sebastian authored and copybara-github committed Oct 29, 2024
1 parent 3a79fff commit 593fa5e
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions third_party/opencv_macos.BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,29 @@ licenses(["notice"]) # BSD license

exports_files(["LICENSE"])

# The path to OpenCV is a combination of the path set for "macos_opencv"
# in the WORKSPACE file and the prefix here.
# Example configurations:
#
# To configure OpenCV 3, obtain the path of OpenCV 3 from Homebrew:
#
# $ brew ls opencv@3 | grep version.hpp
# $ /opt/homebrew/Cellar/opencv@3/3.4.16_10/include/opencv2/core/version.hpp
#
# Then set path in "macos_opencv" rule in the WORKSPACE file to
# "/opt/homebrew/Cellar" and the PREFIX below to "opencv@3/3.4.16_10".
#
#
# To configure OpenCV 4, obtain the path of OpenCV 4 from Homebrew:
#
# $ brew ls opencv | grep version.hpp
# $ /opt/homebrew/Cellar/opencv/4.10.0_12/include/opencv4/opencv2/core/version.hpp
# $ /opt/homebrew/Cellar/opencv/4.10.0_12/include/opencv4/opencv2/dnn/version.hpp
#
# Then set path in "macos_opencv" rule in the WORKSPACE file to
# "/opt/homebrew/Cellar" and the PREFIX below to "opencv/4.10.0_12". For OpenCV
# 4, you will also need to adjust the include paths. The header search path
# should be "include/opencv4/opencv2/**/*.h*" and the include prefix needs to
# be set to "include/opencv4".

PREFIX = "opt/opencv@3"

cc_library(
Expand Down

0 comments on commit 593fa5e

Please sign in to comment.