cmake_parse_arguments(PLUGIN
""
"LINK_FLAGS"
- "SOURCES;API_FILES;MULTIARCH_SOURCES;LINK_LIBRARIES;API_TEST_SOURCES"
+ "SOURCES;API_FILES;MULTIARCH_SOURCES;LINK_LIBRARIES;INSTALL_HEADERS;API_TEST_SOURCES"
${ARGN}
)
set(plugin_name ${name}_plugin)
set(api_headers)
file(RELATIVE_PATH rpath ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
foreach(f ${PLUGIN_API_FILES})
+ get_filename_component(dir ${f} DIRECTORY)
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})
endforeach()
add_library(${plugin_name} SHARED ${PLUGIN_SOURCES} ${api_headers})
add_dependencies(${plugin_name} vpp_version_h api_headers)
if(PLUGIN_LINK_FLAGS)
set_target_properties(${plugin_name} PROPERTIES LINK_FLAGS "${PLUGIN_LINK_FLAGS}")
endif()
+ if(PLUGIN_INSTALL_HEADERS)
+ foreach(file ${PLUGIN_INSTALL_HEADERS})
+ get_filename_component(dir ${file} DIRECTORY)
+ install(FILES ${file} DESTINATION include/vpp_plugins/${name}/${dir})
+ endforeach()
+ 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})
ip6/ioam_cache.api
udp-ping/udp_ping.api
+ INSTALL_HEADERS
+ lib-pot/pot_all_api_h.h
+ lib-pot/pot_msg_enum.h
+ lib-pot/pot_util.h
+ lib-pot/math64.h
+ export/ioam_export_all_api_h.h
+ export/ioam_export_msg_enum.h
+ lib-trace/trace_all_api_h.h
+ lib-trace/trace_msg_enum.h
+ lib-trace/trace_util.h
+ encap/ip6_ioam_trace.h
+ lib-trace/trace_config.h
+ export-common/ioam_export.h
+ lib-vxlan-gpe/vxlan_gpe_all_api_h.h
+ lib-vxlan-gpe/vxlan_gpe_msg_enum.h
+ lib-vxlan-gpe/vxlan_gpe_ioam_util.h
+ lib-vxlan-gpe/vxlan_gpe_ioam_packet.h
+ lib-vxlan-gpe/vxlan_gpe_ioam.h
+ export-vxlan-gpe/vxlan_gpe_ioam_export_all_api_h.h
+ export-vxlan-gpe/vxlan_gpe_ioam_export_msg_enum.h
+ encap/ip6_ioam_e2e.h
+ encap/ip6_ioam_seqno.h
+ lib-e2e/ioam_seqno_lib.h
+ ip6/ioam_cache_all_api_h.h
+ ip6/ioam_cache_msg_enum.h
+ udp-ping/udp_ping_packet.h
+ udp-ping/udp_ping.h
+ udp-ping/udp_ping_util.h
+ udp-ping/udp_ping_all_api_h.h
+ udp-ping/udp_ping_msg_enum.h
+
API_TEST_SOURCES
ioam_test.c
lib-pot/pot_test.c