1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 00:03:03 +04:00

3.4: Use modern OpenVINO package interface

original commit: 437af37b13
This commit is contained in:
Maksim Shabunin
2022-01-15 00:53:19 +03:00
committed by Alexander Alekhin
parent 5b3d5f9f3c
commit d1e76a34a0
4 changed files with 127 additions and 91 deletions
+3 -19
View File
@@ -115,24 +115,8 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
endif()
set(dnn_runtime_libs "")
if(INF_ENGINE_TARGET)
set(use_nn_builder OFF)
if(TARGET inference_engine_nn_builder OR # custom imported target
TARGET IE::inference_engine_nn_builder OR # default imported target via InferenceEngineConfig.cmake
INF_ENGINE_RELEASE VERSION_LESS "2020000000") # compatibility with older versions on IE
set(use_nn_builder ON)
endif()
ocv_option(OPENCV_DNN_IE_NN_BUILDER_2019 "Build with Inference Engine NN Builder API support" ${use_nn_builder}) # future: NOT HAVE_NGRAPH
if(OPENCV_DNN_IE_NN_BUILDER_2019)
message(STATUS "DNN: Enabling Inference Engine NN Builder API support")
add_definitions(-DHAVE_DNN_IE_NN_BUILDER_2019=1)
endif()
list(APPEND dnn_runtime_libs ${INF_ENGINE_TARGET})
endif()
if(HAVE_NGRAPH)
message(STATUS "DNN: Enabling Inference Engine nGraph API support")
add_definitions(-DHAVE_DNN_NGRAPH)
list(APPEND dnn_runtime_libs ngraph::ngraph)
if(TARGET ocv.3rdparty.openvino)
list(APPEND dnn_runtime_libs ocv.3rdparty.openvino)
endif()
ocv_glob_module_sources(${sources_options} SOURCES ${fw_srcs})
@@ -143,7 +127,7 @@ ocv_add_accuracy_tests(${dnn_runtime_libs})
set(perf_path "${CMAKE_CURRENT_LIST_DIR}/perf")
file(GLOB_RECURSE perf_srcs "${perf_path}/*.cpp")
file(GLOB_RECURSE perf_hdrs "${perf_path}/*.hpp" "${perf_path}/*.h")
ocv_add_perf_tests(${INF_ENGINE_TARGET}
ocv_add_perf_tests(${dnn_runtime_libs}
FILES test_common "${CMAKE_CURRENT_LIST_DIR}/test/test_common.hpp" "${CMAKE_CURRENT_LIST_DIR}/test/test_common.impl.hpp"
FILES Src ${perf_srcs}
FILES Include ${perf_hdrs}