summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cmake/plugin.cmake11
-rw-r--r--src/plugins/abf/CMakeLists.txt4
-rw-r--r--src/plugins/acl/CMakeLists.txt5
-rw-r--r--src/plugins/avf/CMakeLists.txt4
-rw-r--r--src/plugins/cdp/CMakeLists.txt6
-rw-r--r--src/plugins/dpdk/CMakeLists.txt5
-rw-r--r--src/plugins/flowprobe/CMakeLists.txt4
-rw-r--r--src/plugins/gbp/CMakeLists.txt5
-rw-r--r--src/plugins/gtpu/CMakeLists.txt4
-rw-r--r--src/plugins/igmp/CMakeLists.txt4
-rw-r--r--src/plugins/ila/CMakeLists.txt8
-rw-r--r--src/plugins/ioam/CMakeLists.txt31
-rw-r--r--src/plugins/ixge/CMakeLists.txt8
-rw-r--r--src/plugins/l2e/CMakeLists.txt5
-rw-r--r--src/plugins/lacp/CMakeLists.txt10
-rw-r--r--src/plugins/lb/CMakeLists.txt5
-rw-r--r--src/plugins/mactime/CMakeLists.txt4
-rw-r--r--src/plugins/map/CMakeLists.txt6
-rw-r--r--src/plugins/memif/CMakeLists.txt5
-rw-r--r--src/plugins/nat/CMakeLists.txt4
-rw-r--r--src/plugins/pppoe/CMakeLists.txt4
-rw-r--r--src/plugins/srv6-ad/CMakeLists.txt3
-rw-r--r--src/plugins/srv6-am/CMakeLists.txt3
-rw-r--r--src/plugins/srv6-as/CMakeLists.txt3
-rw-r--r--src/plugins/stn/CMakeLists.txt5
25 files changed, 153 insertions, 3 deletions
diff --git a/src/cmake/plugin.cmake b/src/cmake/plugin.cmake
index a5b4bf51a16..6cae5e06ab4 100644
--- a/src/cmake/plugin.cmake
+++ b/src/cmake/plugin.cmake
@@ -15,16 +15,19 @@ macro(add_vpp_plugin name)
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)
@@ -40,6 +43,12 @@ macro(add_vpp_plugin name)
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})
diff --git a/src/plugins/abf/CMakeLists.txt b/src/plugins/abf/CMakeLists.txt
index 5db975771a4..54eeecf4127 100644
--- a/src/plugins/abf/CMakeLists.txt
+++ b/src/plugins/abf/CMakeLists.txt
@@ -19,4 +19,8 @@ add_vpp_plugin(abf
API_FILES
abf.api
+
+ INSTALL_HEADERS
+ abf_all_api_h.h
+ abf_msg_enum.h
)
diff --git a/src/plugins/acl/CMakeLists.txt b/src/plugins/acl/CMakeLists.txt
index c6ccb3bdaa0..75a1221bb13 100644
--- a/src/plugins/acl/CMakeLists.txt
+++ b/src/plugins/acl/CMakeLists.txt
@@ -24,4 +24,9 @@ add_vpp_plugin(acl
API_TEST_SOURCES
acl_test.c
+
+ INSTALL_HEADERS
+ acl_all_api_h.h
+ acl_msg_enum.h
+ manual_fns.h
)
diff --git a/src/plugins/avf/CMakeLists.txt b/src/plugins/avf/CMakeLists.txt
index 8547fb76c9c..66e6904a4e5 100644
--- a/src/plugins/avf/CMakeLists.txt
+++ b/src/plugins/avf/CMakeLists.txt
@@ -30,4 +30,8 @@ add_vpp_plugin(avf
API_TEST_SOURCES
avf_test.c
+
+ INSTALL_HEADERS
+ avf_all_api_h.h
+ avf_msg_enum.h
)
diff --git a/src/plugins/cdp/CMakeLists.txt b/src/plugins/cdp/CMakeLists.txt
index 0f3ade8359c..53542f0877e 100644
--- a/src/plugins/cdp/CMakeLists.txt
+++ b/src/plugins/cdp/CMakeLists.txt
@@ -23,5 +23,11 @@ add_vpp_plugin(cdp
API_TEST_SOURCES
cdp_test.c
+
+ INSTALL_HEADERS
+ cdp_all_api_h.h
+ cdp.h
+ cdp_msg_enum.h
+ cdp_protocol.h
)
diff --git a/src/plugins/dpdk/CMakeLists.txt b/src/plugins/dpdk/CMakeLists.txt
index ce07f45a1c5..72b85c147f3 100644
--- a/src/plugins/dpdk/CMakeLists.txt
+++ b/src/plugins/dpdk/CMakeLists.txt
@@ -122,6 +122,11 @@ if(DPDK_INCLUDE_DIR AND DPDK_LIB)
API_TEST_SOURCES
api/dpdk_test.c
+ INSTALL_HEADERS
+ device/dpdk.h
+ api/dpdk_all_api_h.h
+ ipsec/ipsec.h
+
LINK_FLAGS
${DPDK_LINK_FLAGS}
)
diff --git a/src/plugins/flowprobe/CMakeLists.txt b/src/plugins/flowprobe/CMakeLists.txt
index 4c1d4f33320..b6e4996b20b 100644
--- a/src/plugins/flowprobe/CMakeLists.txt
+++ b/src/plugins/flowprobe/CMakeLists.txt
@@ -19,6 +19,10 @@ add_vpp_plugin(flowprobe
API_FILES
flowprobe.api
+ INSTALL_HEADERS
+ flowprobe_all_api_h.h
+ flowprobe_msg_enum.h
+
API_TEST_SOURCES
flowprobe_test.c
)
diff --git a/src/plugins/gbp/CMakeLists.txt b/src/plugins/gbp/CMakeLists.txt
index 738154a16c7..c099060a1de 100644
--- a/src/plugins/gbp/CMakeLists.txt
+++ b/src/plugins/gbp/CMakeLists.txt
@@ -27,4 +27,9 @@ add_vpp_plugin(gbp
API_FILES
gbp.api
+
+ INSTALL_HEADERS
+ gbp.h
+ gbp_all_api_h.h
+ gbp_msg_enum.h
)
diff --git a/src/plugins/gtpu/CMakeLists.txt b/src/plugins/gtpu/CMakeLists.txt
index 2ad38ebb498..0a599bb049f 100644
--- a/src/plugins/gtpu/CMakeLists.txt
+++ b/src/plugins/gtpu/CMakeLists.txt
@@ -21,6 +21,10 @@ add_vpp_plugin(gtpu
API_FILES
gtpu.api
+ INSTALL_HEADERS
+ gtpu_all_api_h.h
+ gtpu_msg_enum.h
+
API_TEST_SOURCES
gtpu_test.c
)
diff --git a/src/plugins/igmp/CMakeLists.txt b/src/plugins/igmp/CMakeLists.txt
index 8ed8c489b7c..089046e9720 100644
--- a/src/plugins/igmp/CMakeLists.txt
+++ b/src/plugins/igmp/CMakeLists.txt
@@ -29,4 +29,8 @@ add_vpp_plugin(igmp
API_FILES
igmp.api
+
+ INSTALL_HEADERS
+ igmp_all_api_h.h
+ igmp_msg_enum.h
)
diff --git a/src/plugins/ila/CMakeLists.txt b/src/plugins/ila/CMakeLists.txt
index f03655b7db4..cf5f34cc8a3 100644
--- a/src/plugins/ila/CMakeLists.txt
+++ b/src/plugins/ila/CMakeLists.txt
@@ -11,5 +11,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-add_vpp_plugin(ila SOURCES ila.c)
+add_vpp_plugin(ila
+ SOURCES
+ ila.c
+
+ INSTALL_HEADERS
+ ila.h
+)
diff --git a/src/plugins/ioam/CMakeLists.txt b/src/plugins/ioam/CMakeLists.txt
index 97381c5cdab..3f465591e44 100644
--- a/src/plugins/ioam/CMakeLists.txt
+++ b/src/plugins/ioam/CMakeLists.txt
@@ -74,6 +74,37 @@ add_vpp_plugin(ioam
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
diff --git a/src/plugins/ixge/CMakeLists.txt b/src/plugins/ixge/CMakeLists.txt
index 14d101eb371..226652c72e2 100644
--- a/src/plugins/ixge/CMakeLists.txt
+++ b/src/plugins/ixge/CMakeLists.txt
@@ -11,4 +11,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-add_vpp_plugin(ixge SOURCES ixge.c)
+add_vpp_plugin(ixge
+ SOURCES
+ ixge.c
+
+ INSTALL_HEADERS
+ ixge.h
+)
diff --git a/src/plugins/l2e/CMakeLists.txt b/src/plugins/l2e/CMakeLists.txt
index 27d5659722d..e063f7d62ec 100644
--- a/src/plugins/l2e/CMakeLists.txt
+++ b/src/plugins/l2e/CMakeLists.txt
@@ -18,4 +18,9 @@ add_vpp_plugin(l2e
API_FILES
l2e.api
+
+ INSTALL_HEADERS
+ l2e.h
+ l2e_all_api_h.h
+ l2e_msg_enum.h
)
diff --git a/src/plugins/lacp/CMakeLists.txt b/src/plugins/lacp/CMakeLists.txt
index 253786ee85b..fd0413c6c8b 100644
--- a/src/plugins/lacp/CMakeLists.txt
+++ b/src/plugins/lacp/CMakeLists.txt
@@ -27,6 +27,16 @@ add_vpp_plugin(lacp
API_FILES
lacp.api
+ INSTALL_HEADERS
+ machine.h
+ rx_machine.h
+ tx_machine.h
+ mux_machine.h
+ ptx_machine.h
+ node.h
+ lacp_all_api_h.h
+ lacp_msg_enum.h
+
API_TEST_SOURCES
lacp_test.c
)
diff --git a/src/plugins/lb/CMakeLists.txt b/src/plugins/lb/CMakeLists.txt
index 85acb62498f..406b16a9fe2 100644
--- a/src/plugins/lb/CMakeLists.txt
+++ b/src/plugins/lb/CMakeLists.txt
@@ -22,6 +22,11 @@ add_vpp_plugin(lb
API_FILES
lb.api
+ INSTALL_HEADERS
+ lb.h
+ util.h
+ lbhash.h
+
API_TEST_SOURCES
lb_test.c
)
diff --git a/src/plugins/mactime/CMakeLists.txt b/src/plugins/mactime/CMakeLists.txt
index ac5077d1860..9f5d431480a 100644
--- a/src/plugins/mactime/CMakeLists.txt
+++ b/src/plugins/mactime/CMakeLists.txt
@@ -19,6 +19,10 @@ add_vpp_plugin(mactime
API_FILES
mactime.api
+ INSTALL_HEADERS
+ mactime_all_api_h.h
+ mactime_msg_enum.h
+
API_TEST_SOURCES
mactime_test.c
)
diff --git a/src/plugins/map/CMakeLists.txt b/src/plugins/map/CMakeLists.txt
index 9db09876023..5bce036ee4f 100644
--- a/src/plugins/map/CMakeLists.txt
+++ b/src/plugins/map/CMakeLists.txt
@@ -26,4 +26,10 @@ add_vpp_plugin(map
API_TEST_SOURCES
map_test.c
+
+ INSTALL_HEADERS
+ map_all_api_h.h
+ map_msg_enum.h
+ map_dpo.h
+ map.h
)
diff --git a/src/plugins/memif/CMakeLists.txt b/src/plugins/memif/CMakeLists.txt
index e704fd17f90..c0d6f0d6338 100644
--- a/src/plugins/memif/CMakeLists.txt
+++ b/src/plugins/memif/CMakeLists.txt
@@ -29,4 +29,9 @@ add_vpp_plugin(memif
MULTIARCH_SOURCES
device.c
node.c
+
+ INSTALL_HEADERS
+ memif.h
+ memif_all_api_h.h
+ memif_msg_enum.h
)
diff --git a/src/plugins/nat/CMakeLists.txt b/src/plugins/nat/CMakeLists.txt
index ef599619bf8..ef82213412b 100644
--- a/src/plugins/nat/CMakeLists.txt
+++ b/src/plugins/nat/CMakeLists.txt
@@ -44,4 +44,8 @@ add_vpp_plugin(nat
API_TEST_SOURCES
nat_test.c
+
+ INSTALL_HEADERS
+ nat_all_api_h.h
+ nat_msg_enum.h
)
diff --git a/src/plugins/pppoe/CMakeLists.txt b/src/plugins/pppoe/CMakeLists.txt
index 13b6b54ee5a..61ed7a4eb09 100644
--- a/src/plugins/pppoe/CMakeLists.txt
+++ b/src/plugins/pppoe/CMakeLists.txt
@@ -22,6 +22,10 @@ add_vpp_plugin(pppoe
API_FILES
pppoe.api
+ INSTALL_HEADERS
+ pppoe_all_api_h.h
+ pppoe_msg_enum.h
+
API_TEST_SOURCES
pppoe_test.c
)
diff --git a/src/plugins/srv6-ad/CMakeLists.txt b/src/plugins/srv6-ad/CMakeLists.txt
index dc222bfff3f..98662e29202 100644
--- a/src/plugins/srv6-ad/CMakeLists.txt
+++ b/src/plugins/srv6-ad/CMakeLists.txt
@@ -15,4 +15,7 @@ add_vpp_plugin(srv6ad
SOURCES
ad.c
node.c
+
+ INSTALL_HEADERS
+ ad.h
)
diff --git a/src/plugins/srv6-am/CMakeLists.txt b/src/plugins/srv6-am/CMakeLists.txt
index 650142fd181..821c232e1c2 100644
--- a/src/plugins/srv6-am/CMakeLists.txt
+++ b/src/plugins/srv6-am/CMakeLists.txt
@@ -15,4 +15,7 @@ add_vpp_plugin(srv6am
SOURCES
am.c
node.c
+
+ INSTALL_HEADERS
+ am.h
)
diff --git a/src/plugins/srv6-as/CMakeLists.txt b/src/plugins/srv6-as/CMakeLists.txt
index 3140c9d3b22..036b86fae91 100644
--- a/src/plugins/srv6-as/CMakeLists.txt
+++ b/src/plugins/srv6-as/CMakeLists.txt
@@ -15,4 +15,7 @@ add_vpp_plugin(srv6as
SOURCES
as.c
node.c
+
+ INSTALL_HEADERS
+ as.h
)
diff --git a/src/plugins/stn/CMakeLists.txt b/src/plugins/stn/CMakeLists.txt
index 38eda9b0366..8d6279cc26c 100644
--- a/src/plugins/stn/CMakeLists.txt
+++ b/src/plugins/stn/CMakeLists.txt
@@ -19,6 +19,11 @@ add_vpp_plugin(stn
API_FILES
stn.api
+ INSTALL_HEADERS
+ stn.h
+ stn_all_api_h.h
+ stn_msg_enum.h
+
API_TEST_SOURCES
stn_test.c
)