diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index 9b06ee3edf8723..79e85f2f444a5a 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -32,8 +32,11 @@ if(ENABLE_SYSTEM_PUGIXML) add_library(pugixml::static ALIAS pugixml) else() function(ie_build_pugixml) - set(BUILD_SHARED_LIBS OFF) - add_subdirectory(pugixml EXCLUDE_FROM_ALL) + function(ie_build_pugixml_static) + set(BUILD_SHARED_LIBS OFF) + add_subdirectory(pugixml EXCLUDE_FROM_ALL) + endfunction() + ie_build_pugixml_static() set_property(TARGET pugixml-static PROPERTY EXPORT_NAME pugixml) openvino_developer_export_targets(COMPONENT openvino_common TARGETS pugixml::static) ov_install_static_lib(pugixml-static openvino_common)