From 4e084337e685204a0142d1dff9e41b4e03d0b582 Mon Sep 17 00:00:00 2001 From: Alex Williams Date: Wed, 29 Aug 2018 16:01:25 -0700 Subject: 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. --- host/cmake/Modules/FindDPDK.cmake | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'host/cmake') 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 ) -- cgit v1.2.3