From 9450345649f5d502cca89658f674161a5f45a376 Mon Sep 17 00:00:00 2001 From: Alex Williams Date: Tue, 14 Jan 2020 15:35:42 -0800 Subject: cmake: Find DPDK via pkg-config, if available Debian uses pkg-config without the libdpdk.so linker script. Use the pkg-config file to grab the installed libraries and determine what to link to. --- host/lib/transport/CMakeLists.txt | 1 + host/lib/transport/uhd-dpdk/CMakeLists.txt | 2 +- host/lib/usrp/mpmd/CMakeLists.txt | 3 ++- host/lib/usrp/x300/CMakeLists.txt | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) (limited to 'host/lib') diff --git a/host/lib/transport/CMakeLists.txt b/host/lib/transport/CMakeLists.txt index d88631ae3..2b1378978 100644 --- a/host/lib/transport/CMakeLists.txt +++ b/host/lib/transport/CMakeLists.txt @@ -143,6 +143,7 @@ endif(ENABLE_LIBERIO) if(ENABLE_DPDK) INCLUDE_SUBDIRECTORY(uhd-dpdk) + include_directories(${DPDK_INCLUDE_DIRS}) LIBUHD_APPEND_SOURCES( ${CMAKE_CURRENT_SOURCE_DIR}/udp_dpdk_link.cpp diff --git a/host/lib/transport/uhd-dpdk/CMakeLists.txt b/host/lib/transport/uhd-dpdk/CMakeLists.txt index a13886653..c19fcae78 100644 --- a/host/lib/transport/uhd-dpdk/CMakeLists.txt +++ b/host/lib/transport/uhd-dpdk/CMakeLists.txt @@ -26,7 +26,7 @@ if(ENABLE_DPDK) ${CMAKE_CURRENT_SOURCE_DIR}/dpdk_io_service.cpp PROPERTIES COMPILE_FLAGS "${UHD_DPDK_CFLAGS} -D_GNU_SOURCE" ) - include_directories(${DPDK_INCLUDE_DIR}) + include_directories(${DPDK_INCLUDE_DIRS}) LIBUHD_APPEND_LIBS(${DPDK_LIBRARIES}) endif(ENABLE_DPDK) diff --git a/host/lib/usrp/mpmd/CMakeLists.txt b/host/lib/usrp/mpmd/CMakeLists.txt index 1eab1f39b..5a6ce72c1 100644 --- a/host/lib/usrp/mpmd/CMakeLists.txt +++ b/host/lib/usrp/mpmd/CMakeLists.txt @@ -25,11 +25,12 @@ if(ENABLE_MPMD) ) set_property( SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/mpmd_link_if_mgr.cpp - PROPERTY COMPILE_DEFINITIONS HAVE_LIBERIO + PROPERTY COMPILE_DEFINITIONS HAVE_LIBERIO ) endif(ENABLE_LIBERIO) if(ENABLE_DPDK) + include_directories(${DPDK_INCLUDE_DIRS}) set_property( SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/mpmd_link_if_ctrl_udp.cpp diff --git a/host/lib/usrp/x300/CMakeLists.txt b/host/lib/usrp/x300/CMakeLists.txt index b00ee357c..d5a7eee4f 100644 --- a/host/lib/usrp/x300/CMakeLists.txt +++ b/host/lib/usrp/x300/CMakeLists.txt @@ -37,6 +37,7 @@ if(ENABLE_X300) ) if(ENABLE_DPDK) + include_directories(${DPDK_INCLUDE_DIRS}) add_definitions(-DHAVE_DPDK) endif(ENABLE_DPDK) endif(ENABLE_X300) -- cgit v1.2.3