Files
openvino/inference-engine/cmake/templates/InferenceEngineDeveloperPackageConfig.cmake.in

80 lines
2.2 KiB
CMake
Raw Normal View History

2020-02-11 22:48:49 +03:00
# Copyright (C) 2018-2020 Intel Corporation
2019-08-09 19:02:42 +03:00
# SPDX-License-Identifier: Apache-2.0
#
# TODO: remove after changing [private plugins]
set(OpenVINO_MAIN_SOURCE_DIR "@OpenVINO_MAIN_SOURCE_DIR@") # KMB, HDDL
set(IE_MAIN_SOURCE_DIR "@IE_MAIN_SOURCE_DIR@") # KMB, HDDL
2019-08-09 19:02:42 +03:00
# Variables to export in plugin's projects
2020-02-11 22:48:49 +03:00
set(ie_options "@IE_OPTIONS@;CMAKE_BUILD_TYPE;CMAKE_SKIP_RPATH")
file(TO_CMAKE_PATH "${CMAKE_CURRENT_LIST_DIR}" cache_path)
2019-08-09 19:02:42 +03:00
foreach(option IN LISTS ie_options)
if(NOT DEFINED "${option}")
load_cache("${cache_path}" READ_WITH_PREFIX "" ${option})
endif()
endforeach()
2019-08-09 19:02:42 +03:00
message(STATUS "The following CMake options are exported from Inference Engine Developer package")
message("")
foreach(option IN LISTS ie_options)
message(" ${option}: ${${option}}")
2019-08-09 19:02:42 +03:00
endforeach()
message("")
2020-02-11 22:48:49 +03:00
set(gflags_DIR "@gflags_BINARY_DIR@")
# GNA lib dir
set(GNA "@GNA@")
2020-02-11 22:48:49 +03:00
# Targets
if(USE_SYSTEM_PUGIXML)
find_package(PugiXML REQUIRED)
set_property(TARGET pugixml PROPERTY IMPORTED_GLOBAL TRUE)
endif()
foreach(component @openvino_export_components@)
include("${CMAKE_CURRENT_LIST_DIR}/${component}_dev_targets.cmake")
endforeach()
2020-02-11 22:48:49 +03:00
get_target_property(InferenceEngine_INCLUDE_DIRS IE::inference_engine INTERFACE_INCLUDE_DIRECTORIES)
set(InferenceEngine_LIBRARIES IE::inference_engine)
2020-02-11 22:48:49 +03:00
2019-08-09 19:02:42 +03:00
#
# Common cmake includes
#
# Inference Engine Developer Scripts package
2019-08-09 19:02:42 +03:00
find_package(IEDevScripts REQUIRED
PATHS "@OpenVINO_MAIN_SOURCE_DIR@/cmake/developer_package"
NO_CMAKE_FIND_ROOT_PATH
NO_DEFAULT_PATH)
2020-02-11 22:48:49 +03:00
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()
2020-04-13 21:17:23 +03:00
# Don't threat deprecated API warnings as errors in 3rd party apps
ie_deprecated_no_errors()
2020-02-11 22:48:49 +03:00
# inherit OpenCV from main IE project if enabled
if (ENABLE_OPENCV)
load_cache("${cache_path}" READ_WITH_PREFIX "" OpenCV_DIR)
find_package(OpenCV)
endif()
# inherit TBB from main IE project if enabled
if (THREADING STREQUAL "TBB" OR THREADING STREQUAL "TBB_AUTO")
load_cache("${cache_path}" READ_WITH_PREFIX "" TBB_DIR)
find_package(TBB)
endif()
find_package(Threads REQUIRED)