diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-07-23 09:41:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-07-23 09:41:28 +0000 |
commit | 76ffd5ce84e4adb412833c8186fc6b26b656947f (patch) | |
tree | 11da7c12c05e9d2a85ec40022d43a970184bb867 /tests/plugins/CMakeLists.txt | |
parent | Initial commit. (diff) | |
download | libyang3-upstream/3.1.0.tar.xz libyang3-upstream/3.1.0.zip |
Adding upstream version 3.1.0.upstream/3.1.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/plugins/CMakeLists.txt')
-rw-r--r-- | tests/plugins/CMakeLists.txt | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/plugins/CMakeLists.txt b/tests/plugins/CMakeLists.txt new file mode 100644 index 0000000..1e21824 --- /dev/null +++ b/tests/plugins/CMakeLists.txt @@ -0,0 +1,19 @@ +include(CMakeParseArguments) + +include_directories(${CMAKE_CURRENT_SOURCE_DIR}) + +function(ly_add_plugin) + cmake_parse_arguments(ADDPLUGIN "" "NAME" "SOURCES" ${ARGN}) + set(PLUGIN_NAME plugin_${ADDPLUGIN_NAME}) + + foreach(PLUGIN_SOURCE ${ADDPLUGIN_SOURCES}) + list(APPEND PLUGIN_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/${PLUGIN_SOURCE}) + endforeach() + + add_library(${PLUGIN_NAME} MODULE ${PLUGIN_SOURCES}) + set_target_properties(${PLUGIN_NAME} PROPERTIES PREFIX "") + target_link_libraries(${PLUGIN_NAME} yang) +endfunction(ly_add_plugin) + +ly_add_plugin(NAME invalid SOURCES invalid.c) +ly_add_plugin(NAME simple SOURCES simple.c) |