Files
openvino/cmake/developer_package/plugins/create_plugin_file.cmake
2022-01-19 01:07:49 +03:00

31 lines
764 B
CMake

# Copyright (C) 2018-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
cmake_policy(SET CMP0007 NEW)
set(newContent " <plugin name=\"${IE_DEVICE_NAME}\" location=\"${IE_PLUGIN_LIBRARY_NAME}\">")
if(IE_PLUGIN_PROPERTIES)
set(newContent "${newContent}
<properties>")
foreach(props IN LISTS IE_PLUGIN_PROPERTIES)
string(REPLACE ":" ";" props "${props}")
list(GET props 0 key)
list(GET props 1 value)
set(newContent "${newContent}
<property key=\"${key}\" value=\"${value}\"/>")
endforeach()
set(newContent "${newContent}
</properties>")
endif()
set(newContent "${newContent}
</plugin>")
file(WRITE "${IE_CONFIG_OUTPUT_FILE}" "${newContent}")