* Updated developer package generation * Try to fix * Reuse find_package(InferenceEngine) inside DeveloperPackage * Fixes for ARM * Fixed double InferenceEngineDeveloperPackage include * WA for OpenCV
78 lines
2.2 KiB
CMake
78 lines
2.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_MAIN_SOURCE_DIR "@OpenVINO_MAIN_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")
|
|
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_MAIN_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)
|
|
|
|
# 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
|
|
set_property(TARGET ngraph::ngraph PROPERTY IMPORTED_GLOBAL TRUE)
|
|
add_library(IE::ngraph ALIAS ngraph::ngraph)
|
|
|
|
foreach(component @openvino_export_components@)
|
|
include("${CMAKE_CURRENT_LIST_DIR}/${component}_dev_targets.cmake")
|
|
endforeach()
|
|
|
|
if(USE_SYSTEM_PUGIXML)
|
|
find_dependency(PugiXML)
|
|
set_property(TARGET pugixml PROPERTY IMPORTED_GLOBAL TRUE)
|
|
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)
|
|
endif()
|
|
endif()
|
|
|
|
# Don't threat deprecated API warnings as errors in 3rd party apps
|
|
ie_deprecated_no_errors()
|