OpenVINO™ is an open source toolkit for optimizing and deploying AI inference
C++ aicomputer-visiondeep-learningdeploy-aidiffusion-modelsgenerative-aigood-first-issueinferencellm-inferencenatural-language-processingnlpopenvinooptimize-aiperformance-boostrecommendation-systemspeech-recognitionstable-diffusiontransformersyolo
# Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
set(TARGET_NAME "openvino_xml_util")
set(TARGET_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include")
set(LIBRARY_SRC
${CMAKE_CURRENT_SOURCE_DIR}/src/weights_provider.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/xml_deserialize_util.cpp
)
set(PUBLIC_HEADERS
${TARGET_INCLUDE_DIR}/openvino/xml_util/weights_provider.hpp
${TARGET_INCLUDE_DIR}/openvino/xml_util/xml_deserialize_util.hpp
)
# Create named folders for the sources within the .vcproj
# Empty name lists them directly under the .vcproj
source_group("src" FILES ${LIBRARY_SRC})
source_group("include" FILES ${PUBLIC_HEADERS})
# Create static library
add_library(${TARGET_NAME} STATIC ${LIBRARY_SRC} ${PUBLIC_HEADERS})
add_library(openvino::xml_util ALIAS ${TARGET_NAME})
set_target_properties(${TARGET_NAME} PROPERTIES EXPORT_NAME xml_util)
target_include_directories(${TARGET_NAME} PUBLIC
$<BUILD_INTERFACE:${TARGET_INCLUDE_DIR}>
$<TARGET_PROPERTY:openvino::core::dev,INTERFACE_INCLUDE_DIRECTORIES>)
ov_add_clang_format_target(${TARGET_NAME}_clang FOR_TARGETS ${TARGET_NAME})
target_link_libraries(${TARGET_NAME} PRIVATE openvino::runtime)
# LTO
set_target_properties(${TARGET_NAME} PROPERTIES INTERPROCEDURAL_OPTIMIZATION_RELEASE ${ENABLE_LTO})
if(NOT BUILD_SHARED_LIBS)
target_compile_definitions(${TARGET_NAME} PUBLIC OPENVINO_STATIC_LIBRARY)
endif()
ov_build_target_faster(${TARGET_NAME} PCH)
# developer package
ov_install_static_lib(${TARGET_NAME} ${OV_CPACK_COMP_CORE})
ov_developer_package_export_targets(TARGET ${TARGET_NAME}
INSTALL_INCLUDE_DIRECTORIES "${TARGET_INCLUDE_DIR}/")