* Moved openvino to src * Moved ngraph and frontends to src * Fixed cmake generation * Moved inference_engine libs to src * Moved C API to src * Fixed CMake generation * Moved readers to tests, snippets and preprocessing to common * Fixed CMake * Moved transformations and lp_transformations * Fixed transformations cmake * Fixed build * Fixed unit-tests and ci paths * Fixed docs * Fixed C API build * Try to fix static build * More clear order * Renamed inference_engine_legacy_api to legacy * Fixed some cmake scripts * Fixed path to legacy * Fixed Myriad plugin * Fixed v7 reader * Fixed plugin.hpp * Fixed developer config * Fixed ie_parallel
104 lines
3.2 KiB
CMake
104 lines
3.2 KiB
CMake
# Copyright (C) 2018-2021 Intel Corporation
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
@PACKAGE_INIT@
|
|
|
|
include(CMakeFindDependencyMacro)
|
|
|
|
# TODO: remove after changing [private plugins]
|
|
set_and_check(OpenVINO_SOURCE_DIR "@OpenVINO_SOURCE_DIR@") # KMB
|
|
set_and_check(OpenVINO_MAIN_SOURCE_DIR "@OpenVINO_SOURCE_DIR@") # KMB
|
|
set_and_check(IE_MAIN_SOURCE_DIR "@IE_MAIN_SOURCE_DIR@") # HDDL
|
|
|
|
# Variables to export in plugin's projects
|
|
|
|
set(ie_options "@IE_OPTIONS@;CMAKE_BUILD_TYPE;CMAKE_SKIP_RPATH")
|
|
list(APPEND ie_options CMAKE_CXX_COMPILER_LAUNCHER CMAKE_C_COMPILER_LAUNCHER)
|
|
file(TO_CMAKE_PATH "${CMAKE_CURRENT_LIST_DIR}" cache_path)
|
|
|
|
message(STATUS "The following CMake options are exported from Inference Engine Developer package")
|
|
message("")
|
|
foreach(option IN LISTS ie_options)
|
|
if(NOT DEFINED "${option}")
|
|
load_cache("${cache_path}" READ_WITH_PREFIX "" ${option})
|
|
endif()
|
|
message(" ${option}: ${${option}}")
|
|
endforeach()
|
|
message("")
|
|
|
|
# for samples in 3rd party projects
|
|
set_and_check(gflags_DIR "@gflags_BINARY_DIR@")
|
|
|
|
#
|
|
# Content
|
|
#
|
|
|
|
find_dependency(IEDevScripts
|
|
PATHS "${OpenVINO_SOURCE_DIR}/cmake/developer_package"
|
|
NO_CMAKE_FIND_ROOT_PATH
|
|
NO_DEFAULT_PATH)
|
|
|
|
find_dependency(InferenceEngine
|
|
PATHS "${CMAKE_CURRENT_LIST_DIR}"
|
|
NO_CMAKE_FIND_ROOT_PATH
|
|
NO_DEFAULT_PATH)
|
|
|
|
find_dependency(ngraph
|
|
PATHS "${CMAKE_CURRENT_LIST_DIR}/src/core"
|
|
NO_CMAKE_FIND_ROOT_PATH
|
|
NO_DEFAULT_PATH)
|
|
|
|
# create targets with old names for compatibility
|
|
if(TARGET openvino::core AND NOT TARGET IE::core)
|
|
add_library(IE::core INTERFACE IMPORTED)
|
|
set_target_properties(IE::core PROPERTIES
|
|
INTERFACE_LINK_LIBRARIES openvino::core)
|
|
endif()
|
|
|
|
if(TARGET openvino::runtime AND NOT TARGET IE::runtime)
|
|
add_library(IE::runtime INTERFACE IMPORTED)
|
|
set_target_properties(IE::runtime PROPERTIES
|
|
INTERFACE_LINK_LIBRARIES openvino::runtime)
|
|
endif()
|
|
|
|
# WA for cmake: it exports ngraph as IE::ngraph in the IE export list
|
|
# while we already have ngraph export in its own export list as ngraph::ngraph
|
|
if(TARGET ngraph::ngraph AND NOT TARGET IE::ngraph)
|
|
add_library(IE::ngraph INTERFACE IMPORTED)
|
|
set_target_properties(IE::ngraph PROPERTIES INTERFACE_LINK_LIBRARIES ngraph::ngraph)
|
|
endif()
|
|
|
|
foreach(component @openvino_export_components@)
|
|
include("${CMAKE_CURRENT_LIST_DIR}/${component}_dev_targets.cmake")
|
|
endforeach()
|
|
|
|
if(ENABLE_SYSTEM_PUGIXML)
|
|
find_dependency(PugiXML)
|
|
set_property(TARGET pugixml PROPERTY IMPORTED_GLOBAL TRUE)
|
|
add_library(IE::pugixml ALIAS pugixml)
|
|
endif()
|
|
|
|
# inherit OpenCV from main IE project if enabled
|
|
if ("@OpenCV_FOUND@")
|
|
load_cache("${cache_path}" READ_WITH_PREFIX "" OpenCV_DIR)
|
|
find_dependency(OpenCV)
|
|
endif()
|
|
|
|
#
|
|
# Extra Compile Flags
|
|
#
|
|
|
|
if(NOT MSVC)
|
|
ie_add_compiler_flags(-Wno-error=unused-variable)
|
|
if(CMAKE_COMPILER_IS_GNUCXX)
|
|
ie_add_compiler_flags(-Wno-error=unused-but-set-variable)
|
|
if(SUGGEST_OVERRIDE_SUPPORTED)
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-suggest-override")
|
|
endif()
|
|
endif()
|
|
endif()
|
|
|
|
# Don't threat deprecated API warnings as errors in 3rd party apps
|
|
ie_deprecated_no_errors()
|