Skip to content

Commit

Permalink
Opencv win from env (#101)
Browse files Browse the repository at this point in the history
* Opencv win
  • Loading branch information
rasapala authored Dec 9, 2024
1 parent 71e4adb commit 8d91559
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions third_party/model_api/model_api.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ cmake(
cache_entries = {{
"CMAKE_POSITION_INDEPENDENT_CODE": "ON",
"OpenVINO_DIR": "{openvino_dir}",
"OpenCV_DIR": "C:/opt/opencv/build",
"OpenCV_DIR": "{opencv_dir}",
}},
env = {{
"HTTP_PROXY": "{http_proxy}",
Expand Down Expand Up @@ -115,6 +115,7 @@ def _impl(repository_ctx):
http_proxy = repository_ctx.os.environ.get("HTTP_PROXY", "")
https_proxy = repository_ctx.os.environ.get("HTTPS_PROXY", "")
openvino_dir = repository_ctx.os.environ.get("OpenVINO_DIR", "")
opencv_dir = repository_ctx.os.environ.get("OpenCV_DIR", "")
if not http_proxy:
http_proxy = repository_ctx.os.environ.get("http_proxy", "")
if not https_proxy:
Expand All @@ -126,7 +127,7 @@ def _impl(repository_ctx):
else:
build_file_content = _get_linux_build_file()

repository_ctx.file("BUILD", build_file_content.format(http_proxy=http_proxy, https_proxy=https_proxy, openvino_dir=openvino_dir))
repository_ctx.file("BUILD", build_file_content.format(http_proxy=http_proxy, https_proxy=https_proxy, openvino_dir=openvino_dir, opencv_dir=opencv_dir))

model_api_repository = repository_rule(
implementation = _impl,
Expand Down

0 comments on commit 8d91559

Please sign in to comment.