mirror of
https://github.com/EttusResearch/uhd.git
synced 2026-10-25 17:36:10 +00:00
The parameters for compiling and linking against DPDK (DPDK_CFLAGS
and DPDK_LDFLAGS or DPDK_INCLUDE_DIRS, DPDK_LIBRARIES and
DPDK_LIBRARY_DIRS) are not trivial to determine and can be best
provided by pkg-config. Therefore, use pkg-config to find DPDK and
do not allow user provided DPDK variables.
To compile UHD against DPDK which was installed to a custom prefix,
e.g. /opt/dpdk-22.11, provide this path as parameter
CMAKE_PREFIX_PATH:
cmake .. -DCMAKE_PREFIX_PATH=/opt/dpdk-22.11
24 lines
820 B
CMake
24 lines
820 B
CMake
#
|
|
# Copyright 2018 Ettus Research, a National Instruments Company
|
|
# Copyright 2020 Ettus Research, a National Instruments Brand
|
|
#
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
#
|
|
# Find DPDK by using pkg-config. This sets various variables prefixed
|
|
# with "DPDK_".
|
|
#
|
|
# The following variables are used by the UHD build system:
|
|
# DPDK_INCLUDE_DIRS, the include directories
|
|
# DPDK_CFLAGS, the compiler flags
|
|
# DPDK_LDFLAGS, the linker flags
|
|
# DPDK_LIBRARIES, the list of libraries
|
|
# DPDK_FOUND, If false, do not try to use DPDK.
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
|
|
find_package(PkgConfig)
|
|
PKG_CHECK_MODULES(DPDK libdpdk>=18.11)
|
|
|
|
find_package_handle_standard_args(DPDK DEFAULT_MSG DPDK_INCLUDE_DIRS DPDK_CFLAGS DPDK_LDFLAGS DPDK_LIBRARIES)
|
|
mark_as_advanced(DPDK_INCLUDE_DIRS DPDK_CFLAGS DPDK_LDFLAGS DPDK_LIBRARIES)
|