Use OpenCV_DIR from cache only if user doesn't define OpenCV_DIR (#18963)
This commit is contained in:
1 parent
32e0e859b2
commit
73530676cc
2 files changed
+10
-4
No files matched your search
@@ -151,8 +151,11 @@ endif()
|
||||
unset(_IE_nlohmann_json_FOUND)
|
||||
|
||||
# inherit OpenCV from main IE project if enabled
|
||||
if ("@OpenCV_FOUND@")
|
||||
load_cache("${cache_path}" READ_WITH_PREFIX "" OpenCV_DIR)
|
||||
if("@OpenCV_FOUND@")
|
||||
# Use OpenCV_DIR from cache only if user doesn't define OpenCV_DIR
|
||||
if(NOT OpenCV_DIR)
|
||||
load_cache("${cache_path}" READ_WITH_PREFIX "" OpenCV_DIR)
|
||||
endif()
|
||||
find_dependency(OpenCV)
|
||||
endif()
|
||||
|
||||
|
||||
@@ -71,8 +71,11 @@ foreach(component @openvino_export_components@)
|
||||
endforeach()
|
||||
|
||||
# inherit OpenCV from main OpenVINO project if enabled
|
||||
if ("@OpenCV_FOUND@")
|
||||
load_cache("${cache_path}" READ_WITH_PREFIX "" OpenCV_DIR)
|
||||
if("@OpenCV_FOUND@")
|
||||
# Use OpenCV_DIR from cache only if user doesn't define OpenCV_DIR
|
||||
if(NOT OpenCV_DIR)
|
||||
load_cache("${cache_path}" READ_WITH_PREFIX "" OpenCV_DIR)
|
||||
endif()
|
||||
find_dependency(OpenCV)
|
||||
endif()
|
||||
|
||||
|
||||
Reference in new issue
Block a user