Fix install failures for static libs with EXCLUDE_FROM_ALL (#10706)

* Remove EXCLUDE_FROM_ALL for some static targets

* Add install check for static libs
This commit is contained in:
Pavel Zamelin
2022-03-02 03:39:30 +03:00
committed by GitHub
parent e75ee60bec
commit 9cd3bff7df

View File

@@ -212,6 +212,10 @@ endif()
macro(ov_install_static_lib target comp)
if(NOT BUILD_SHARED_LIBS)
get_target_property(target_type ${target} TYPE)
if(${target_type} STREQUAL "STATIC_LIBRARY")
set_target_properties(${target} PROPERTIES EXCLUDE_FROM_ALL FALSE)
endif()
install(TARGETS ${target} EXPORT OpenVINOTargets
ARCHIVE DESTINATION ${IE_CPACK_ARCHIVE_PATH} COMPONENT ${comp} ${ARGN})
endif()