Fix openvino build without OpenCV. (#5154)

* Fix openvino build without OpenCV.

* Don't call find_package in case of ENABLE_OPENCV=OFF
This commit is contained in:
Peter Würtz authored and GitHub committed 2021-04-22 09:46:40 +03:00
1 parent aec12d6dff
commit b3ac14c8d4
1 file changed
+6 -1
+6 -1
View File
@@ -15,7 +15,12 @@ if(NOT CLDNN__IOCL_ICD_INCDIRS OR TRUE)
endif()
# remove OpenCV related sources
find_package(OpenCV QUIET)
if (ENABLE_OPENCV)
find_package(OpenCV QUIET)
else()
set(OpenCV_FOUND FALSE)
endif()
if(NOT OpenCV_FOUND)
list(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/dldt_optimization_guide5.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/ShapeInference.cpp")