Files
openvino/cmake/developer_package/plugins/create_plugin_file.cmake
T

31 lines
764 B
CMake
Raw Normal View History

2023-01-16 11:02:17 +04:00
# Copyright (C) 2018-2023 Intel Corporation
2019-08-09 19:02:42 +03:00
# SPDX-License-Identifier: Apache-2.0
#
2021-09-03 22:01:18 +03:00
cmake_policy(SET CMP0007 NEW)
set(newContent " <plugin name=\"${OV_DEVICE_NAME}\" location=\"${OV_PLUGIN_LIBRARY_NAME}\">")
2019-08-09 19:02:42 +03:00
if(OV_PLUGIN_PROPERTIES)
2019-08-09 19:02:42 +03:00
set(newContent "${newContent}
<properties>")
foreach(props IN LISTS OV_PLUGIN_PROPERTIES)
2021-09-03 22:01:18 +03:00
string(REPLACE ":" ";" props "${props}")
2019-08-09 19:02:42 +03:00
list(GET props 0 key)
list(GET props 1 value)
2021-09-03 22:01:18 +03:00
2019-08-09 19:02:42 +03:00
set(newContent "${newContent}
<property key=\"${key}\" value=\"${value}\"/>")
endforeach()
set(newContent "${newContent}
</properties>")
endif()
set(newContent "${newContent}
</plugin>")
file(WRITE "${OV_CONFIG_OUTPUT_FILE}" "${newContent}")