Only works on systems with pkg-config (tested with Ubuntu). Requires cmake with FindPkgConfig (tested with v 3.18).
Guide https://doc.dpdk.org/guides-20.05/linux_gsg/build_dpdk.html
Basic steps:
meson <options> build
cd build
ninja
ninja install
ldconfig
Tested with version 21.11.
Used to build the flow_filter example.
cmake_minimum_required(VERSION 3.18)
SET(PRJ flow_filter)
PROJECT(${PRJ})
FIND_PACKAGE(PkgConfig REQUIRED)
pkg_check_modules(DPDK REQUIRED libdpdk)
ADD_EXECUTABLE(${PRJ} main.c)
TARGET_LINK_LIBRARIES(${PRJ} ${DPDK_LIBRARIES})
target_compile_options(${PRJ} PUBLIC ${DPDK_CFLAGS})
TARGET_LINK_LIBRARIES(${PRJ} pthread dl rt m numa)