aboutsummaryrefslogtreecommitdiffstats
path: root/src/cmake/plugin.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmake/plugin.cmake')
-rw-r--r--src/cmake/plugin.cmake31
1 files changed, 24 insertions, 7 deletions
diff --git a/src/cmake/plugin.cmake b/src/cmake/plugin.cmake
index a0442394092..9f9a6460f0f 100644
--- a/src/cmake/plugin.cmake
+++ b/src/cmake/plugin.cmake
@@ -14,7 +14,7 @@
macro(add_vpp_plugin name)
cmake_parse_arguments(PLUGIN
""
- "LINK_FLAGS"
+ "LINK_FLAGS;COMPONENT"
"SOURCES;API_FILES;MULTIARCH_SOURCES;LINK_LIBRARIES;INSTALL_HEADERS;API_TEST_SOURCES"
${ARGN}
)
@@ -26,8 +26,11 @@ macro(add_vpp_plugin name)
vpp_generate_api_header(${f} plugins)
list(APPEND api_headers ${f}.h ${f}.json)
set_property(GLOBAL APPEND PROPERTY VPP_API_FILES ${rpath}/${f})
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${f}.h DESTINATION
- include/vpp_plugins/${name}/${dir})
+ install(
+ FILES ${CMAKE_CURRENT_BINARY_DIR}/${f}.h
+ DESTINATION include/vpp_plugins/${name}/${dir}
+ COMPONENT vpp-dev
+ )
endforeach()
add_library(${plugin_name} SHARED ${PLUGIN_SOURCES} ${api_headers})
target_compile_options(${plugin_name} PRIVATE -Wall)
@@ -47,9 +50,16 @@ macro(add_vpp_plugin name)
if(PLUGIN_INSTALL_HEADERS)
foreach(file ${PLUGIN_INSTALL_HEADERS})
get_filename_component(dir ${file} DIRECTORY)
- install(FILES ${file} DESTINATION include/vpp_plugins/${name}/${dir})
+ install(
+ FILES ${file}
+ DESTINATION include/vpp_plugins/${name}/${dir}
+ COMPONENT vpp-dev
+ )
endforeach()
endif()
+ if(NOT PLUGIN_COMPONENT)
+ set(PLUGIN_COMPONENT vpp-plugin-misc)
+ endif()
if(PLUGIN_API_TEST_SOURCES)
set(test_plugin_name ${name}_test_plugin)
add_library(${test_plugin_name} SHARED ${PLUGIN_API_TEST_SOURCES} ${api_headers})
@@ -57,9 +67,16 @@ macro(add_vpp_plugin name)
set_target_properties(${test_plugin_name} PROPERTIES
PREFIX ""
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/vpp_api_test_plugins)
- install(TARGETS ${test_plugin_name} DESTINATION ${VPP_LIB_DIR_NAME}/vpp_api_test_plugins COMPONENT
- plugins)
+ install(
+ TARGETS ${test_plugin_name}
+ DESTINATION ${VPP_LIB_DIR_NAME}/vpp_api_test_plugins
+ COMPONENT ${PLUGIN_COMPONENT}
+ )
endif()
- install(TARGETS ${plugin_name} DESTINATION ${VPP_LIB_DIR_NAME}/vpp_plugins COMPONENT plugins)
+ install(
+ TARGETS ${plugin_name}
+ DESTINATION ${VPP_LIB_DIR_NAME}/vpp_plugins
+ COMPONENT ${PLUGIN_COMPONENT}
+ )
endmacro()