aboutsummaryrefslogtreecommitdiffstats
path: root/host/cmake
diff options
context:
space:
mode:
authorAlex Williams <alex.williams@ni.com>2018-08-29 16:01:25 -0700
committerMartin Braun <martin.braun@ettus.com>2018-08-29 18:25:18 -0700
commit4e084337e685204a0142d1dff9e41b4e03d0b582 (patch)
tree09253a09485dd8fd063839d82caab4d8de9638a9 /host/cmake
parent2084a5a72df45fbcda82839ea35486f8583227bc (diff)
downloaduhd-4e084337e685204a0142d1dff9e41b4e03d0b582.tar.gz
uhd-4e084337e685204a0142d1dff9e41b4e03d0b582.tar.bz2
uhd-4e084337e685204a0142d1dff9e41b4e03d0b582.zip
cmake: Check for rte_ethdev.h when finding DPDK
Ubuntu splits headers between the arch-specific and noarch directories, so we were only getting one of them. That caused build failure for DPDK. This fixes the issue by grabbing a fundamental header from the other set.
Diffstat (limited to 'host/cmake')
-rw-r--r--host/cmake/Modules/FindDPDK.cmake10
1 files changed, 9 insertions, 1 deletions
diff --git a/host/cmake/Modules/FindDPDK.cmake b/host/cmake/Modules/FindDPDK.cmake
index 4382a8cce..53ecf1112 100644
--- a/host/cmake/Modules/FindDPDK.cmake
+++ b/host/cmake/Modules/FindDPDK.cmake
@@ -14,11 +14,19 @@
include(FindPackageHandleStandardArgs)
-find_path ( DPDK_INCLUDE_DIR rte_config.h
+find_path ( DPDK_INCLUDE_CONFIG_DIR rte_config.h
PATHS ENV RTE_INCLUDE
PATH_SUFFIXES dpdk
)
+find_path ( DPDK_INCLUDE_ETHDEV_DIR rte_ethdev.h
+ PATHS ENV RTE_INCLUDE
+ PATH_SUFFIXES dpdk
+)
+
+set(DPDK_INCLUDE_DIR ${DPDK_INCLUDE_CONFIG_DIR} ${DPDK_INCLUDE_ETHDEV_DIR})
+list(REMOVE_DUPLICATES DPDK_INCLUDE_DIR)
+
find_library(DPDK_LIBRARY
PATHS $ENV{RTE_SDK_DIR}/$ENV{RTE_TARGET}/lib
)