From 753f4d5918588387d90b5100bab1fd0279630777 Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Mon, 15 Mar 2021 13:04:20 +0300 Subject: [PATCH] Second attempt to fix CVS-50011 (#4659) * Second attemp to fix CVS-50011 * Clarified OpenCV dependencies * Fixes --- .../ie_bridges/c/samples/common/opencv_c_wraper/CMakeLists.txt | 2 +- inference-engine/ie_bridges/c/tests/CMakeLists.txt | 2 +- inference-engine/samples/benchmark_app/CMakeLists.txt | 2 +- inference-engine/samples/common/format_reader/CMakeLists.txt | 2 +- inference-engine/samples/hello_classification/CMakeLists.txt | 2 +- inference-engine/samples/hello_reshape_ssd/CMakeLists.txt | 2 +- inference-engine/tests/unit/inference_engine/CMakeLists.txt | 2 +- .../tests_deprecated/functional/shared_tests/CMakeLists.txt | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/inference-engine/ie_bridges/c/samples/common/opencv_c_wraper/CMakeLists.txt b/inference-engine/ie_bridges/c/samples/common/opencv_c_wraper/CMakeLists.txt index aff7229c9f0..957db434c6e 100644 --- a/inference-engine/ie_bridges/c/samples/common/opencv_c_wraper/CMakeLists.txt +++ b/inference-engine/ie_bridges/c/samples/common/opencv_c_wraper/CMakeLists.txt @@ -12,7 +12,7 @@ file(GLOB HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/*.h) add_library(${TARGET_NAME} SHARED ${HEADERS} ${SOURCES}) # Find OpenCV components if exist -find_package(OpenCV COMPONENTS imgcodecs videoio QUIET) +find_package(OpenCV COMPONENTS core imgproc imgcodecs QUIET) if(NOT OpenCV_FOUND) message(WARNING "OPENCV is disabled or not found, ${TARGET_NAME} is built without OPENCV support") else() diff --git a/inference-engine/ie_bridges/c/tests/CMakeLists.txt b/inference-engine/ie_bridges/c/tests/CMakeLists.txt index fa5514db0a2..7eb9379636b 100644 --- a/inference-engine/ie_bridges/c/tests/CMakeLists.txt +++ b/inference-engine/ie_bridges/c/tests/CMakeLists.txt @@ -5,7 +5,7 @@ set(TARGET_NAME "InferenceEngineCAPITests") # Find OpenCV components if exist -find_package(OpenCV COMPONENTS imgcodecs videoio imgproc QUIET) +find_package(OpenCV COMPONENTS core imgproc imgcodecs QUIET) if(NOT OpenCV_FOUND) message(WARNING "OPENCV is disabled or not found, ${TARGET_NAME} is disabled") return() diff --git a/inference-engine/samples/benchmark_app/CMakeLists.txt b/inference-engine/samples/benchmark_app/CMakeLists.txt index a74294a0fbb..a59dcffb844 100644 --- a/inference-engine/samples/benchmark_app/CMakeLists.txt +++ b/inference-engine/samples/benchmark_app/CMakeLists.txt @@ -9,4 +9,4 @@ ie_add_sample(NAME benchmark_app SOURCES ${SRC} HEADERS ${HDR} DEPENDENCIES format_reader - OPENCV_DEPENDENCIES imgcodecs) + OPENCV_DEPENDENCIES core) diff --git a/inference-engine/samples/common/format_reader/CMakeLists.txt b/inference-engine/samples/common/format_reader/CMakeLists.txt index c5c54496775..260d3004f7f 100644 --- a/inference-engine/samples/common/format_reader/CMakeLists.txt +++ b/inference-engine/samples/common/format_reader/CMakeLists.txt @@ -21,7 +21,7 @@ source_group("include" FILES ${LIBRARY_HEADERS}) add_library(${TARGET_NAME} SHARED ${MAIN_SRC} ${LIBRARY_HEADERS}) # Find OpenCV components if exist -find_package(OpenCV COMPONENTS imgcodecs videoio imgproc QUIET) +find_package(OpenCV COMPONENTS core imgproc imgcodecs QUIET) if(NOT OpenCV_FOUND) message(WARNING "OPENCV is disabled or not found, ${TARGET_NAME} will be built without OPENCV support") else() diff --git a/inference-engine/samples/hello_classification/CMakeLists.txt b/inference-engine/samples/hello_classification/CMakeLists.txt index 303f54bb8b1..9ff48b380aa 100644 --- a/inference-engine/samples/hello_classification/CMakeLists.txt +++ b/inference-engine/samples/hello_classification/CMakeLists.txt @@ -4,4 +4,4 @@ ie_add_sample(NAME hello_classification SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/main.cpp" - OPENCV_DEPENDENCIES imgcodecs) + OPENCV_DEPENDENCIES core imgcodecs) diff --git a/inference-engine/samples/hello_reshape_ssd/CMakeLists.txt b/inference-engine/samples/hello_reshape_ssd/CMakeLists.txt index f87718c7d5a..f89f20e1935 100644 --- a/inference-engine/samples/hello_reshape_ssd/CMakeLists.txt +++ b/inference-engine/samples/hello_reshape_ssd/CMakeLists.txt @@ -15,7 +15,7 @@ ie_add_sample(NAME hello_reshape_ssd SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/main.cpp" HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/reshape_ssd_extension.hpp" - OPENCV_DEPENDENCIES imgcodecs) + OPENCV_DEPENDENCIES core imgproc imgcodecs) find_package(ngraph REQUIRED) target_link_libraries(hello_reshape_ssd PRIVATE ${NGRAPH_LIBRARIES}) diff --git a/inference-engine/tests/unit/inference_engine/CMakeLists.txt b/inference-engine/tests/unit/inference_engine/CMakeLists.txt index 1d9515f540f..004ed4fa90c 100644 --- a/inference-engine/tests/unit/inference_engine/CMakeLists.txt +++ b/inference-engine/tests/unit/inference_engine/CMakeLists.txt @@ -5,7 +5,7 @@ set(TARGET_NAME ieUnitTests) # Find OpenCV components if exist -find_package(OpenCV COMPONENTS imgcodecs videoio imgproc QUIET) +find_package(OpenCV COMPONENTS core QUIET) if(NOT OpenCV_FOUND) message(WARNING "OPENCV is disabled or not found, ${TARGET_NAME} needs OpenCV for its build") else() diff --git a/inference-engine/tests_deprecated/functional/shared_tests/CMakeLists.txt b/inference-engine/tests_deprecated/functional/shared_tests/CMakeLists.txt index 62019d7638e..19afd11fada 100644 --- a/inference-engine/tests_deprecated/functional/shared_tests/CMakeLists.txt +++ b/inference-engine/tests_deprecated/functional/shared_tests/CMakeLists.txt @@ -33,7 +33,7 @@ if(ENABLE_MKL_DNN) endif() # Find OpenCV components if exist -find_package(OpenCV COMPONENTS imgcodecs imgproc QUIET) +find_package(OpenCV COMPONENTS core imgproc QUIET) if(OpenCV_FOUND) target_compile_definitions(${TARGET_NAME} PUBLIC USE_OPENCV) else()