Use OpenCV_DIR from cache only if user doesn't define OpenCV_DIR (#18963)
This commit is contained in:
parent
32e0e859b2
commit
73530676cc
@ -151,8 +151,11 @@ endif()
|
|||||||
unset(_IE_nlohmann_json_FOUND)
|
unset(_IE_nlohmann_json_FOUND)
|
||||||
|
|
||||||
# inherit OpenCV from main IE project if enabled
|
# inherit OpenCV from main IE project if enabled
|
||||||
if ("@OpenCV_FOUND@")
|
if("@OpenCV_FOUND@")
|
||||||
load_cache("${cache_path}" READ_WITH_PREFIX "" OpenCV_DIR)
|
# 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)
|
find_dependency(OpenCV)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -71,8 +71,11 @@ foreach(component @openvino_export_components@)
|
|||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
# inherit OpenCV from main OpenVINO project if enabled
|
# inherit OpenCV from main OpenVINO project if enabled
|
||||||
if ("@OpenCV_FOUND@")
|
if("@OpenCV_FOUND@")
|
||||||
load_cache("${cache_path}" READ_WITH_PREFIX "" OpenCV_DIR)
|
# 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)
|
find_dependency(OpenCV)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user