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.
This commit is contained in:
Alex Williams 2018-08-29 16:01:25 -07:00 committed by Martin Braun
parent 2084a5a72d
commit 4e084337e6

View file

@ -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
)