1 # Copyright (C) 2019 Intel Corporation
2 # SPDX-License-Identifier: Apache-2.0
5 set(OpenVINO_MAIN_SOURCE_DIR "@CMAKE_SOURCE_DIR@")
6 set(IE_MAIN_SOURCE_DIR "@CMAKE_SOURCE_DIR@/inference-engine")
7 file(TO_CMAKE_PATH "${CMAKE_CURRENT_LIST_DIR}" cache_path)
9 # inherit OpenCV from main IE project
10 load_cache("${cache_path}" READ_WITH_PREFIX "" OpenCV_DIR)
11 find_package(OpenCV COMPONENTS imgcodecs)
13 find_package(Threads REQUIRED)
14 find_package(gflags REQUIRED PATHS "@InferenceEngine_BINARY_DIR@/samples/thirdparty/gflags")
18 include("${CMAKE_CURRENT_LIST_DIR}/targets_developer.cmake")
20 # add additional interface include directories needed for plugin development
21 if(NOT TARGET IE::inference_engine)
22 message(FATAL_ERROR "The target IE::inference_engine does not exist")
25 get_target_property(prepro_headers IE::inference_engine_preproc INTERFACE_INCLUDE_DIRECTORIES)
27 set(ie_plugin_headers "${IE_MAIN_SOURCE_DIR}/src/inference_engine;${prepro_headers}")
28 set_property(TARGET IE::inference_engine APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${ie_plugin_headers}")
29 set_property(TARGET IE::inference_engine PROPERTY IMPORTED_GLOBAL TRUE)
31 get_target_property(InferenceEngine_INCLUDE_DIRS IE::inference_engine INTERFACE_INCLUDE_DIRECTORIES)
32 set(InferenceEngine_LIBRARIES IE::inference_engine IE::inference_engine_nn_builder)
34 # Variables to export in plugin's projects
36 set(ie_options "@IE_OPTIONS@;CMAKE_BUILD_TYPE")
38 load_cache("${cache_path}" READ_WITH_PREFIX "" ${ie_options})
40 message(STATUS "The following CMake options are exported from Inference Engine Developer package")
42 foreach(option IN LISTS ie_options)
43 message(" ${option}: ${${option}}")
48 # Common cmake includes
51 list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake;${OpenVINO_MAIN_SOURCE_DIR}/cmake;${IE_MAIN_SOURCE_DIR}/cmake")
53 # generic stuff from developer package
54 include(developer_package)
55 include(developer_package_ie)