diff --git a/cmake/templates/InferenceEngineConfig.cmake.in b/cmake/templates/InferenceEngineConfig.cmake.in index c14e4f18ced82f..c5b95bd75efc68 100644 --- a/cmake/templates/InferenceEngineConfig.cmake.in +++ b/cmake/templates/InferenceEngineConfig.cmake.in @@ -125,9 +125,9 @@ if(NOT TARGET inference_engine) INTERFACE_LINK_LIBRARIES IE::core) endif() - if(TARGET IE::runtime::c AND NOT TARGET IE::inference_engine_c) - add_library(IE::inference_engine_c INTERFACE IMPORTED) - set_target_properties(IE::inference_engine_c PROPERTIES + if(TARGET IE::runtime::c AND NOT TARGET IE::inference_engine_c_api) + add_library(IE::inference_engine_c_api INTERFACE IMPORTED) + set_target_properties(IE::inference_engine_c_api PROPERTIES INTERFACE_LINK_LIBRARIES IE::runtime::c) endif() endif() diff --git a/inference-engine/src/inference_engine/CMakeLists.txt b/inference-engine/src/inference_engine/CMakeLists.txt index 410f58c28bd4db..13c934bee97739 100644 --- a/inference-engine/src/inference_engine/CMakeLists.txt +++ b/inference-engine/src/inference_engine/CMakeLists.txt @@ -219,6 +219,14 @@ set_target_properties(${TARGET_NAME}_s PROPERTIES EXCLUDE_FROM_ALL ON) set_target_properties(${TARGET_NAME} ${TARGET_NAME}_obj ${TARGET_NAME}_s PROPERTIES INTERPROCEDURAL_OPTIMIZATION_RELEASE ${ENABLE_LTO}) +# Export for build tree + +export(TARGETS ${TARGET_NAME} NAMESPACE IE:: + APPEND FILE "${CMAKE_BINARY_DIR}/InferenceEngineTargets.cmake") + +export(TARGETS ${TARGET_NAME} NAMESPACE openvino:: + APPEND FILE "${CMAKE_BINARY_DIR}/OpenVINOTargets.cmake") + # Export for developer package openvino_developer_export_targets(COMPONENT inference_engine TARGETS ${TARGET_NAME}_plugin_api)