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:
parent
aec12d6dff
commit
b3ac14c8d4
@ -15,7 +15,12 @@ if(NOT CLDNN__IOCL_ICD_INCDIRS OR TRUE)
|
||||
endif()
|
||||
|
||||
# remove OpenCV related sources
|
||||
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")
|
||||
|
Loading…
Reference in New Issue
Block a user