aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2018-08-25 11:33:29 +0200
committerDamjan Marion <damarion@cisco.com>2018-08-25 11:56:03 +0200
commit74449b8b68801e0938f528f19d69e75644cb2ee9 (patch)
treee3ba6294196c478d1a53c296043fb3ca58c6ee9c /src
parent2bfdda76d8b1cffcd8e30ca6855f293b1b1953c5 (diff)
cmake: improve add_vpp_plugin macro
Change-Id: Iffd5c45ab242a919592a1f686f7f880936b68a1a Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/CMakeLists.txt28
-rw-r--r--src/plugins/abf/CMakeLists.txt7
-rw-r--r--src/plugins/acl/CMakeLists.txt7
-rw-r--r--src/plugins/avf/CMakeLists.txt10
-rw-r--r--src/plugins/cdp/CMakeLists.txt9
-rw-r--r--src/plugins/dpdk/CMakeLists.txt34
-rw-r--r--src/plugins/flowprobe/CMakeLists.txt9
-rw-r--r--src/plugins/gbp/CMakeLists.txt7
-rw-r--r--src/plugins/gtpu/CMakeLists.txt9
-rw-r--r--src/plugins/igmp/CMakeLists.txt7
-rw-r--r--src/plugins/ila/CMakeLists.txt2
-rw-r--r--src/plugins/ioam/CMakeLists.txt29
-rw-r--r--src/plugins/ixge/CMakeLists.txt4
-rw-r--r--src/plugins/l2e/CMakeLists.txt7
-rw-r--r--src/plugins/lacp/CMakeLists.txt9
-rw-r--r--src/plugins/lb/CMakeLists.txt9
-rw-r--r--src/plugins/mactime/CMakeLists.txt9
-rw-r--r--src/plugins/map/CMakeLists.txt7
-rw-r--r--src/plugins/marvell/CMakeLists.txt2
-rw-r--r--src/plugins/memif/CMakeLists.txt10
-rw-r--r--src/plugins/nat/CMakeLists.txt7
-rw-r--r--src/plugins/pppoe/CMakeLists.txt9
-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.txt9
-rw-r--r--src/plugins/tlsmbedtls/CMakeLists.txt9
-rw-r--r--src/plugins/tlsopenssl/CMakeLists.txt10
-rw-r--r--src/plugins/unittest/CMakeLists.txt3
29 files changed, 177 insertions, 94 deletions
diff --git a/src/plugins/CMakeLists.txt b/src/plugins/CMakeLists.txt
index 56cb6ef39fc..8ea99c7566a 100644
--- a/src/plugins/CMakeLists.txt
+++ b/src/plugins/CMakeLists.txt
@@ -16,19 +16,33 @@ include_directories (
${CMAKE_CURRENT_BINARY_DIR}
)
-macro(add_vpp_plugin plugin_name)
+macro(add_vpp_plugin name)
+ cmake_parse_arguments(PLUGIN
+ ""
+ "LINK_FLAGS"
+ "SOURCES;API_FILES;MULTIARCH_SOURCES;LINK_LIBRARIES"
+ ${ARGN}
+ )
+ set(plugin_name ${name}_plugin)
set(api_headers)
- foreach(f ${ARGN})
- if(${f} MATCHES ".*\.api$")
- vpp_generate_api_header(${f} plugins)
- list(APPEND api_headers ${f}.h ${f}.json)
- endif()
+ foreach(f ${PLUGIN_API_FILES})
+ vpp_generate_api_header(${f} plugins)
+ list(APPEND api_headers ${f}.h ${f}.json)
endforeach()
- add_library(${plugin_name} SHARED ${ARGN} ${api_headers})
+ add_library(${plugin_name} SHARED ${PLUGIN_SOURCES} ${api_headers})
add_dependencies(${plugin_name} vpp_version_h api_headers)
set_target_properties(${plugin_name} PROPERTIES
PREFIX ""
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/vpp_plugins)
+ if(PLUGIN_MULTIARCH_SOURCES)
+ vpp_library_set_multiarch_sources(${plugin_name} ${PLUGIN_MULTIARCH_SOURCES})
+ endif()
+ if(PLUGIN_LINK_LIBRARIES)
+ target_link_libraries(${plugin_name} ${PLUGIN_LINK_LIBRARIES})
+ endif()
+ if(PLUGIN_LINK_FLAGS)
+ set_target_properties(${plugin_name} PROPERTIES LINK_FLAGS "${PLUGIN_LINK_FLAGS}")
+ endif()
install(TARGETS ${plugin_name} DESTINATION lib/vpp_plugins COMPONENT plugins)
endmacro()
diff --git a/src/plugins/abf/CMakeLists.txt b/src/plugins/abf/CMakeLists.txt
index 2bb90e272ee..5db975771a4 100644
--- a/src/plugins/abf/CMakeLists.txt
+++ b/src/plugins/abf/CMakeLists.txt
@@ -11,9 +11,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-add_vpp_plugin(abf_plugin
- abf.api
+add_vpp_plugin(abf
+ SOURCES
abf_api.c
abf_itf_attach.c
abf_policy.c
+
+ API_FILES
+ abf.api
)
diff --git a/src/plugins/acl/CMakeLists.txt b/src/plugins/acl/CMakeLists.txt
index 2040522affd..1779c49966b 100644
--- a/src/plugins/acl/CMakeLists.txt
+++ b/src/plugins/acl/CMakeLists.txt
@@ -11,11 +11,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-add_vpp_plugin(acl_plugin
- acl.api
+add_vpp_plugin(acl
+ SOURCES
acl.c
hash_lookup.c
lookup_context.c
sess_mgmt_node.c
dataplane_node.c
+
+ API_FILES
+ acl.api
)
diff --git a/src/plugins/avf/CMakeLists.txt b/src/plugins/avf/CMakeLists.txt
index 8f8798bc8ed..80f3b53ee6a 100644
--- a/src/plugins/avf/CMakeLists.txt
+++ b/src/plugins/avf/CMakeLists.txt
@@ -11,7 +11,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-add_vpp_plugin(avf_plugin
+add_vpp_plugin(avf
+ SOURCES
cli.c
device.c
format.c
@@ -19,10 +20,11 @@ add_vpp_plugin(avf_plugin
output.c
plugin.c
avf_api.c
- avf.api
-)
-vpp_library_set_multiarch_sources(avf_plugin
+ MULTIARCH_SOURCES
input.c
output.c
+
+ API_FILES
+ avf.api
)
diff --git a/src/plugins/cdp/CMakeLists.txt b/src/plugins/cdp/CMakeLists.txt
index 036833f5315..9f0b07edcfa 100644
--- a/src/plugins/cdp/CMakeLists.txt
+++ b/src/plugins/cdp/CMakeLists.txt
@@ -11,15 +11,18 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-add_vpp_plugin(cdp_plugin
- cdp.api
+add_vpp_plugin(cdp
+ SOURCES
cdp.c
cdp_input.c
cdp_node.c
cdp_periodic.c
+
+ API_FILES
+ cdp.api
)
-add_vpp_api_test_plugin(cdp_test_plugin
+add_vpp_api_test_plugin(cdp_test
cdp.api
cdp_test.c
)
diff --git a/src/plugins/dpdk/CMakeLists.txt b/src/plugins/dpdk/CMakeLists.txt
index 66407041eae..0b08b0663b6 100644
--- a/src/plugins/dpdk/CMakeLists.txt
+++ b/src/plugins/dpdk/CMakeLists.txt
@@ -81,7 +81,17 @@ endif()
##############################################################################
if(DPDK_INCLUDE_DIR AND DPDK_LIB)
include_directories (${DPDK_INCLUDE_DIR})
- add_vpp_plugin(dpdk_plugin
+
+ message(STATUS "Found DPDK ${DPDK_VERSION} in ${DPDK_INCLUDE_DIR}")
+ get_filename_component(DPDK_LIB_DIR ${DPDK_LIB} DIRECTORY)
+ set(DPDK_LINK_FLAGS "-L${DPDK_LIB_DIR} -Wl,--whole-archive,${DPDK_LIB},--no-whole-archive")
+ if(DPDK_RTE_LIBRTE_PMD_AESNI_MB OR DPDK_RTE_LIBRTE_PMD_AESNI_GCM)
+ set(DPDK_LINK_FLAGS "${DPDK_LINK_FLAGS} -Wl,--exclude-libs,libIPSec_MB.a,-l:libIPSec_MB.a")
+ message(STATUS "DPDK depends on IPSec MB library")
+ endif()
+ set(DPDK_LINK_FLAGS "${DPDK_LINK_FLAGS} -Wl,-lnuma")
+ add_vpp_plugin(dpdk
+ SOURCES
buffer.c
main.c
thread.c
@@ -100,25 +110,19 @@ if(DPDK_INCLUDE_DIR AND DPDK_LIB)
ipsec/esp_decrypt.c
ipsec/esp_encrypt.c
ipsec/ipsec.c
- api/dpdk.api
- )
- vpp_library_set_multiarch_sources(dpdk_plugin
+ MULTIARCH_SOURCES
buffer.c
device/device.c
device/node.c
- )
- message(STATUS "Found DPDK ${DPDK_VERSION} in ${DPDK_INCLUDE_DIR}")
- get_filename_component(DPDK_LIB_DIR ${DPDK_LIB} DIRECTORY)
- set(DPDK_LINK_FLAGS "-L${DPDK_LIB_DIR} -Wl,--whole-archive,${DPDK_LIB},--no-whole-archive")
- if(DPDK_RTE_LIBRTE_PMD_AESNI_MB OR DPDK_RTE_LIBRTE_PMD_AESNI_GCM)
- set(DPDK_LINK_FLAGS "${DPDK_LINK_FLAGS} -Wl,--exclude-libs,libIPSec_MB.a,-l:libIPSec_MB.a")
- message(STATUS "DPDK depends on IPSec MB library")
- endif()
- set(DPDK_LINK_FLAGS "${DPDK_LINK_FLAGS} -Wl,-lnuma")
- set_target_properties(dpdk_plugin PROPERTIES LINK_FLAGS "${DPDK_LINK_FLAGS}")
+ API_FILES
+ api/dpdk.api
+
+ LINK_FLAGS
+ ${DPDK_LINK_FLAGS}
+ )
else()
- message(WARNING "DPDK not found - dpdk_plugin disabled")
+ message(WARNING "DPDK not found - dpdk disabled")
endif()
diff --git a/src/plugins/flowprobe/CMakeLists.txt b/src/plugins/flowprobe/CMakeLists.txt
index df803a8d668..f65fe452b75 100644
--- a/src/plugins/flowprobe/CMakeLists.txt
+++ b/src/plugins/flowprobe/CMakeLists.txt
@@ -11,13 +11,16 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-add_vpp_plugin(flowprobe_plugin
- flowprobe.api
+add_vpp_plugin(flowprobe
+ SOURCES
flowprobe.c
node.c
+
+ API_FILES
+ flowprobe.api
)
-add_vpp_api_test_plugin(flowprobe_test_plugin
+add_vpp_api_test_plugin(flowprobe_test
flowprobe.api
flowprobe_test.c
)
diff --git a/src/plugins/gbp/CMakeLists.txt b/src/plugins/gbp/CMakeLists.txt
index a9e9bd62692..738154a16c7 100644
--- a/src/plugins/gbp/CMakeLists.txt
+++ b/src/plugins/gbp/CMakeLists.txt
@@ -11,8 +11,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-add_vpp_plugin(gbp_plugin
- gbp.api
+add_vpp_plugin(gbp
+ SOURCES
gbp_subnet.c
gbp_contract.c
gbp_endpoint.c
@@ -24,4 +24,7 @@ add_vpp_plugin(gbp_plugin
gbp_fwd.c
gbp_fwd_dpo.c
gbp_api.c
+
+ API_FILES
+ gbp.api
)
diff --git a/src/plugins/gtpu/CMakeLists.txt b/src/plugins/gtpu/CMakeLists.txt
index 1633d43cc31..1032b14b4ab 100644
--- a/src/plugins/gtpu/CMakeLists.txt
+++ b/src/plugins/gtpu/CMakeLists.txt
@@ -11,15 +11,18 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-add_vpp_plugin(gtpu_plugin
- gtpu.api
+add_vpp_plugin(gtpu
+ SOURCES
gtpu.c
gtpu_api.c
gtpu_decap.c
gtpu_encap.c
+
+ API_FILES
+ gtpu.api
)
-add_vpp_api_test_plugin(gtpu_test_plugin
+add_vpp_api_test_plugin(gtpu_test
gtpu.api
gtpu_test.c
)
diff --git a/src/plugins/igmp/CMakeLists.txt b/src/plugins/igmp/CMakeLists.txt
index a3f976cbc57..8ed8c489b7c 100644
--- a/src/plugins/igmp/CMakeLists.txt
+++ b/src/plugins/igmp/CMakeLists.txt
@@ -11,8 +11,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-add_vpp_plugin(igmp_plugin
- igmp.api
+add_vpp_plugin(igmp
+ SOURCES
igmp.c
igmp_query.c
igmp_report.c
@@ -26,4 +26,7 @@ add_vpp_plugin(igmp_plugin
igmp_pkt.c
igmp_ssm_range.c
igmp_format.c
+
+ API_FILES
+ igmp.api
)
diff --git a/src/plugins/ila/CMakeLists.txt b/src/plugins/ila/CMakeLists.txt
index 2aa1892cf47..f03655b7db4 100644
--- a/src/plugins/ila/CMakeLists.txt
+++ b/src/plugins/ila/CMakeLists.txt
@@ -11,5 +11,5 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-add_vpp_plugin(ila_plugin ila.c)
+add_vpp_plugin(ila SOURCES ila.c)
diff --git a/src/plugins/ioam/CMakeLists.txt b/src/plugins/ioam/CMakeLists.txt
index ed8bd196aba..5648a65acd2 100644
--- a/src/plugins/ioam/CMakeLists.txt
+++ b/src/plugins/ioam/CMakeLists.txt
@@ -11,27 +11,24 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-add_vpp_plugin(ioam_plugin
+add_vpp_plugin(ioam
+ SOURCES
# iOAM Proof of Transit
- lib-pot/pot.api
lib-pot/pot_util.c
encap/ip6_ioam_pot.c
lib-pot/pot_api.c
# iOAM trace export for IPv6
- export/ioam_export.api
export/ioam_export.c
export/node.c
export/ioam_export_thread.c
# iOAM Trace
- lib-trace/trace.api
lib-trace/trace_util.c
encap/ip6_ioam_trace.c
lib-trace/trace_api.c
# VxLAN-GPE
- lib-vxlan-gpe/ioam_vxlan_gpe.api
lib-vxlan-gpe/ioam_encap.c
lib-vxlan-gpe/ioam_decap.c
lib-vxlan-gpe/ioam_transit.c
@@ -39,7 +36,6 @@ add_vpp_plugin(ioam_plugin
lib-vxlan-gpe/vxlan_gpe_api.c
lib-vxlan-gpe/vxlan_gpe_ioam_trace.c
lib-vxlan-gpe/vxlan_gpe_ioam.c
- export-vxlan-gpe/vxlan_gpe_ioam_export.api
export-vxlan-gpe/vxlan_gpe_ioam_export.c
export-vxlan-gpe/vxlan_gpe_node.c
export-vxlan-gpe/vxlan_gpe_ioam_export_thread.c
@@ -59,40 +55,47 @@ add_vpp_plugin(ioam_plugin
analyse/ioam_summary_export.c
# iOAM record cache and rewrite
- ip6/ioam_cache.api
ip6/ioam_cache.c
ip6/ioam_cache_node.c
ip6/ioam_cache_tunnel_select_node.c
# udp ping
- udp-ping/udp_ping.api
udp-ping/udp_ping_node.c
udp-ping/udp_ping_util.c
udp-ping/udp_ping_export.c
udp-ping/udp_ping_api.c
+
+ API_FILES
+ lib-pot/pot.api
+ export/ioam_export.api
+ lib-trace/trace.api
+ lib-vxlan-gpe/ioam_vxlan_gpe.api
+ export-vxlan-gpe/vxlan_gpe_ioam_export.api
+ ip6/ioam_cache.api
+ udp-ping/udp_ping.api
)
-add_vpp_api_test_plugin(ioam_pot_test_plugin
+add_vpp_api_test_plugin(ioam_pot_test
lib-pot/pot.api
lib-pot/pot_test.c
)
-add_vpp_api_test_plugin(ioam_export_test_plugin
+add_vpp_api_test_plugin(ioam_export_test
export/ioam_export.api
export/ioam_export_test.c
)
-add_vpp_api_test_plugin(ioam_trace_test_plugin
+add_vpp_api_test_plugin(ioam_trace_test
lib-trace/trace.api
lib-trace/trace_test.c
)
-add_vpp_api_test_plugin(ioam_vxlan_gpe_test_plugin
+add_vpp_api_test_plugin(ioam_vxlan_gpe_test
lib-vxlan-gpe/ioam_vxlan_gpe.api
lib-vxlan-gpe/vxlan_gpe_test.c
)
-add_vpp_api_test_plugin(ioam_udp_ping_test_plugin
+add_vpp_api_test_plugin(ioam_udp_ping_test
udp-ping/udp_ping.api
udp-ping/udp_ping_test.c
)
diff --git a/src/plugins/ixge/CMakeLists.txt b/src/plugins/ixge/CMakeLists.txt
index bd3454d3de8..14d101eb371 100644
--- a/src/plugins/ixge/CMakeLists.txt
+++ b/src/plugins/ixge/CMakeLists.txt
@@ -11,6 +11,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-add_vpp_plugin(ixge_plugin
- ixge.c
-)
+add_vpp_plugin(ixge SOURCES ixge.c)
diff --git a/src/plugins/l2e/CMakeLists.txt b/src/plugins/l2e/CMakeLists.txt
index ba9cc6a5cbd..27d5659722d 100644
--- a/src/plugins/l2e/CMakeLists.txt
+++ b/src/plugins/l2e/CMakeLists.txt
@@ -11,8 +11,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-add_vpp_plugin(l2e_plugin
- l2e.api
+add_vpp_plugin(l2e
+ SOURCES
l2e_api.c
l2e.c
+
+ API_FILES
+ l2e.api
)
diff --git a/src/plugins/lacp/CMakeLists.txt b/src/plugins/lacp/CMakeLists.txt
index 0bd79e9800a..f6a30a711ae 100644
--- a/src/plugins/lacp/CMakeLists.txt
+++ b/src/plugins/lacp/CMakeLists.txt
@@ -11,8 +11,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-add_vpp_plugin(lacp_plugin
- lacp.api
+add_vpp_plugin(lacp
+ SOURCES
lacp.c
lacp_api.c
selection.c
@@ -23,9 +23,12 @@ add_vpp_plugin(lacp_plugin
cli.c
input.c
node.c
+
+ API_FILES
+ lacp.api
)
-add_vpp_api_test_plugin(lacp_test_plugin
+add_vpp_api_test_plugin(lacp_test
lacp.api
lacp_test.c
)
diff --git a/src/plugins/lb/CMakeLists.txt b/src/plugins/lb/CMakeLists.txt
index 4df9dae4a08..f9bca075050 100644
--- a/src/plugins/lb/CMakeLists.txt
+++ b/src/plugins/lb/CMakeLists.txt
@@ -11,16 +11,19 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-add_vpp_plugin(lb_plugin
- lb.api
+add_vpp_plugin(lb
+ SOURCES
api.c
cli.c
lb.c
node.c
util.c
+
+ API_FILES
+ lb.api
)
-add_vpp_api_test_plugin(lb_test_plugin
+add_vpp_api_test_plugin(lb_test
lb.api
lb_test.c
)
diff --git a/src/plugins/mactime/CMakeLists.txt b/src/plugins/mactime/CMakeLists.txt
index 5f82f4c0fb9..f2986a95c0d 100644
--- a/src/plugins/mactime/CMakeLists.txt
+++ b/src/plugins/mactime/CMakeLists.txt
@@ -11,13 +11,16 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-add_vpp_plugin(mactime_plugin
- mactime.api
+add_vpp_plugin(mactime
+ SOURCES
mactime.c
node.c
+
+ API_FILES
+ mactime.api
)
-add_vpp_api_test_plugin(mactime_test_plugin
+add_vpp_api_test_plugin(mactime_test
mactime.api
mactime_test.c
)
diff --git a/src/plugins/map/CMakeLists.txt b/src/plugins/map/CMakeLists.txt
index 1dc1bedb51c..a3e6e3d2540 100644
--- a/src/plugins/map/CMakeLists.txt
+++ b/src/plugins/map/CMakeLists.txt
@@ -11,8 +11,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-add_vpp_plugin(map_plugin
- map.api
+add_vpp_plugin(map
+ SOURCES
ip4_map.c
ip4_map_t.c
ip6_map.c
@@ -20,4 +20,7 @@ add_vpp_plugin(map_plugin
map_api.c
map.c
map_dpo.c
+
+ API_FILES
+ map.api
)
diff --git a/src/plugins/marvell/CMakeLists.txt b/src/plugins/marvell/CMakeLists.txt
index 8767a4fd2b6..39b7b85c123 100644
--- a/src/plugins/marvell/CMakeLists.txt
+++ b/src/plugins/marvell/CMakeLists.txt
@@ -15,7 +15,7 @@ find_path(MUSDK_INCLUDE_DIR NAMES marvell/pp2/pp2.h)
find_library(MUSDK_LIB NAMES musdk)
if(MUSDK_INCLUDE_DIR AND MUSDK_LIB)
- add_vpp_plugin(marvell_plugin
+ add_vpp_plugin(marvell
marvell.api
plugin.c
pp2/cli.c
diff --git a/src/plugins/memif/CMakeLists.txt b/src/plugins/memif/CMakeLists.txt
index 54d0befe29e..b225192d006 100644
--- a/src/plugins/memif/CMakeLists.txt
+++ b/src/plugins/memif/CMakeLists.txt
@@ -11,17 +11,19 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-add_vpp_plugin(memif_plugin
- memif.api
+add_vpp_plugin(memif
+ SOURCES
memif.c
memif_api.c
cli.c
node.c
device.c
socket.c
-)
-vpp_library_set_multiarch_sources(memif_plugin
+ API_FILES
+ memif.api
+
+ MULTIARCH_SOURCES
device.c
node.c
)
diff --git a/src/plugins/nat/CMakeLists.txt b/src/plugins/nat/CMakeLists.txt
index 931fa2c7984..1d0b641b378 100644
--- a/src/plugins/nat/CMakeLists.txt
+++ b/src/plugins/nat/CMakeLists.txt
@@ -11,8 +11,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-add_vpp_plugin(nat_plugin
- nat.api
+add_vpp_plugin(nat
+ SOURCES
nat.c
nat_api.c
in2out.c
@@ -38,4 +38,7 @@ add_vpp_plugin(nat_plugin
nat66_cli.c
nat66_in2out.c
nat66_out2in.c
+
+ API_FILES
+ nat.api
)
diff --git a/src/plugins/pppoe/CMakeLists.txt b/src/plugins/pppoe/CMakeLists.txt
index fca210211db..90599688fed 100644
--- a/src/plugins/pppoe/CMakeLists.txt
+++ b/src/plugins/pppoe/CMakeLists.txt
@@ -11,16 +11,19 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-add_vpp_plugin(pppoe_plugin
- pppoe.api
+add_vpp_plugin(pppoe
+ SOURCES
pppoe_api.c
pppoe.c
pppoe_cp.c
pppoe_cp_node.c
pppoe_decap.c
+
+ API_FILES
+ pppoe.api
)
-add_vpp_api_test_plugin(pppoe_test_plugin
+add_vpp_api_test_plugin(pppoe_test
pppoe.api
pppoe_test.c
)
diff --git a/src/plugins/srv6-ad/CMakeLists.txt b/src/plugins/srv6-ad/CMakeLists.txt
index 29959a150b4..dc222bfff3f 100644
--- a/src/plugins/srv6-ad/CMakeLists.txt
+++ b/src/plugins/srv6-ad/CMakeLists.txt
@@ -11,7 +11,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-add_vpp_plugin(srv6ad_plugin
+add_vpp_plugin(srv6ad
+ SOURCES
ad.c
node.c
)
diff --git a/src/plugins/srv6-am/CMakeLists.txt b/src/plugins/srv6-am/CMakeLists.txt
index 995db98b47d..650142fd181 100644
--- a/src/plugins/srv6-am/CMakeLists.txt
+++ b/src/plugins/srv6-am/CMakeLists.txt
@@ -11,7 +11,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-add_vpp_plugin(srv6am_plugin
+add_vpp_plugin(srv6am
+ SOURCES
am.c
node.c
)
diff --git a/src/plugins/srv6-as/CMakeLists.txt b/src/plugins/srv6-as/CMakeLists.txt
index 42b23f3ecf5..3140c9d3b22 100644
--- a/src/plugins/srv6-as/CMakeLists.txt
+++ b/src/plugins/srv6-as/CMakeLists.txt
@@ -11,7 +11,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-add_vpp_plugin(srv6as_plugin
+add_vpp_plugin(srv6as
+ SOURCES
as.c
node.c
)
diff --git a/src/plugins/stn/CMakeLists.txt b/src/plugins/stn/CMakeLists.txt
index c29cf5f0c5c..d987176b9cd 100644
--- a/src/plugins/stn/CMakeLists.txt
+++ b/src/plugins/stn/CMakeLists.txt
@@ -11,13 +11,16 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-add_vpp_plugin(stn_plugin
- stn.api
+add_vpp_plugin(stn
+ SOURCES
stn.c
stn_api.c
+
+ API_FILES
+ stn.api
)
-add_vpp_api_test_plugin(stn_test_plugin
+add_vpp_api_test_plugin(stn_test
stn.api
stn_test.c
)
diff --git a/src/plugins/tlsmbedtls/CMakeLists.txt b/src/plugins/tlsmbedtls/CMakeLists.txt
index 03f8a17fe86..13fa12e5c55 100644
--- a/src/plugins/tlsmbedtls/CMakeLists.txt
+++ b/src/plugins/tlsmbedtls/CMakeLists.txt
@@ -21,8 +21,13 @@ set (MBEDTLS_LIB ${MBEDTLS_LIB1} ${MBEDTLS_LIB2} ${MBEDTLS_LIB3})
if(MBEDTLS_INCLUDE_DIR AND MBEDTLS_LIB)
include_directories(${MBEDTLS_INCLUDE_DIR})
- add_vpp_plugin(tlsmbedtls_plugin tls_mbedtls.c)
- target_link_libraries(tlsmbedtls_plugin ${MBEDTLS_LIB})
+ add_vpp_plugin(tlsmbedtls
+ SOURCES
+ tls_mbedtls.c
+
+ LINK_LIBRARIES
+ ${MBEDTLS_LIB}
+ )
message(STATUS "Found mbedTLS in ${MBEDTLS_INCLUDE_DIR}")
else()
message(WARNING "-- mbedTLS not found - tlsmbedtls_plugin disabled")
diff --git a/src/plugins/tlsopenssl/CMakeLists.txt b/src/plugins/tlsopenssl/CMakeLists.txt
index 7659cc0feaf..fac27f5457c 100644
--- a/src/plugins/tlsopenssl/CMakeLists.txt
+++ b/src/plugins/tlsopenssl/CMakeLists.txt
@@ -12,7 +12,13 @@
# limitations under the License.
if(OPENSSL_FOUND)
- add_vpp_plugin(tlsopenssl_plugin tls_openssl.c tls_async.c)
- target_link_libraries(tlsopenssl_plugin ${OPENSSL_LIBRARIES})
+ add_vpp_plugin(tlsopenssl
+ SOURCES
+ tls_openssl.c
+ tls_async.c
+
+ LINK_LIBRARIES
+ ${OPENSSL_LIBRARIES}
+ )
endif()
diff --git a/src/plugins/unittest/CMakeLists.txt b/src/plugins/unittest/CMakeLists.txt
index eba6e230d16..f790a23a60e 100644
--- a/src/plugins/unittest/CMakeLists.txt
+++ b/src/plugins/unittest/CMakeLists.txt
@@ -11,7 +11,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-add_vpp_plugin(unittest_plugin
+add_vpp_plugin(unittest
+ SOURCES
unittest.c
tcp_test.c
bihash_test.c