2016-08-02 15:50:13 +00:00
|
|
|
# Try to find dpdk
|
2016-02-03 10:31:45 +00:00
|
|
|
#
|
|
|
|
# Once done, this will define
|
|
|
|
#
|
|
|
|
# DPDK_FOUND
|
|
|
|
# DPDK_INCLUDE_DIR
|
|
|
|
# DPDK_LIBRARIES
|
|
|
|
|
|
|
|
find_path(DPDK_INCLUDE_DIR rte_config.h
|
|
|
|
PATH_SUFFIXES dpdk)
|
2016-08-02 15:50:13 +00:00
|
|
|
find_library(DPDK_rte_hash_LIBRARY rte_hash)
|
|
|
|
find_library(DPDK_rte_kvargs_LIBRARY rte_kvargs)
|
|
|
|
find_library(DPDK_rte_mbuf_LIBRARY rte_mbuf)
|
2017-01-02 08:41:08 +00:00
|
|
|
find_library(DPDK_rte_ethdev_LIBRARY rte_ethdev)
|
2016-02-03 10:31:45 +00:00
|
|
|
find_library(DPDK_rte_mempool_LIBRARY rte_mempool)
|
|
|
|
find_library(DPDK_rte_ring_LIBRARY rte_ring)
|
2016-08-02 15:50:13 +00:00
|
|
|
find_library(DPDK_rte_eal_LIBRARY rte_eal)
|
|
|
|
find_library(DPDK_rte_cmdline_LIBRARY rte_cmdline)
|
|
|
|
find_library(DPDK_rte_pmd_bond_LIBRARY rte_pmd_bond)
|
|
|
|
find_library(DPDK_rte_pmd_vmxnet3_uio_LIBRARY rte_pmd_vmxnet3_uio)
|
|
|
|
find_library(DPDK_rte_pmd_ixgbe_LIBRARY rte_pmd_ixgbe)
|
|
|
|
find_library(DPDK_rte_pmd_i40e_LIBRARY rte_pmd_i40e)
|
|
|
|
find_library(DPDK_rte_pmd_ring_LIBRARY rte_pmd_ring)
|
|
|
|
find_library(DPDK_rte_pmd_af_packet_LIBRARY rte_pmd_af_packet)
|
|
|
|
|
|
|
|
set(check_LIBRARIES
|
|
|
|
${DPDK_rte_hash_LIBRARY}
|
|
|
|
${DPDK_rte_kvargs_LIBRARY}
|
|
|
|
${DPDK_rte_mbuf_LIBRARY}
|
2017-01-02 08:41:08 +00:00
|
|
|
${DPDK_rte_ethdev_LIBRARY}
|
2016-08-02 15:50:13 +00:00
|
|
|
${DPDK_rte_mempool_LIBRARY}
|
|
|
|
${DPDK_rte_ring_LIBRARY}
|
|
|
|
${DPDK_rte_eal_LIBRARY}
|
|
|
|
${DPDK_rte_cmdline_LIBRARY}
|
|
|
|
${DPDK_rte_pmd_bond_LIBRARY}
|
|
|
|
${DPDK_rte_pmd_vmxnet3_uio_LIBRARY}
|
|
|
|
${DPDK_rte_pmd_ixgbe_LIBRARY}
|
|
|
|
${DPDK_rte_pmd_i40e_LIBRARY}
|
|
|
|
${DPDK_rte_pmd_ring_LIBRARY}
|
|
|
|
${DPDK_rte_pmd_af_packet_LIBRARY})
|
2016-02-03 10:31:45 +00:00
|
|
|
|
|
|
|
mark_as_advanced(DPDK_INCLUDE_DIR
|
2016-08-02 15:50:13 +00:00
|
|
|
DPDK_rte_hash_LIBRARY
|
|
|
|
DPDK_rte_kvargs_LIBRARY
|
|
|
|
DPDK_rte_mbuf_LIBRARY
|
2017-01-02 08:41:08 +00:00
|
|
|
DPDK_rte_ethdev_LIBRARY
|
2016-02-03 10:31:45 +00:00
|
|
|
DPDK_rte_mempool_LIBRARY
|
2016-08-02 15:50:13 +00:00
|
|
|
DPDK_rte_ring_LIBRARY
|
|
|
|
DPDK_rte_eal_LIBRARY
|
|
|
|
DPDK_rte_cmdline_LIBRARY
|
|
|
|
DPDK_rte_pmd_bond_LIBRARY
|
|
|
|
DPDK_rte_pmd_vmxnet3_uio_LIBRARY
|
|
|
|
DPDK_rte_pmd_ixgbe_LIBRARY
|
|
|
|
DPDK_rte_pmd_i40e_LIBRARY
|
|
|
|
DPDK_rte_pmd_ring_LIBRARY
|
|
|
|
DPDK_rte_pmd_af_packet_LIBRARY)
|
|
|
|
|
|
|
|
if (EXISTS ${WITH_DPDK_MLX5})
|
|
|
|
find_library(DPDK_rte_pmd_mlx5_LIBRARY rte_pmd_mlx5)
|
|
|
|
list(APPEND check_LIBRARIES ${DPDK_rte_pmd_mlx5_LIBRARY})
|
|
|
|
mark_as_advanced(DPDK_rte_pmd_mlx5_LIBRARY)
|
|
|
|
endif()
|
2016-02-03 10:31:45 +00:00
|
|
|
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
|
|
find_package_handle_standard_args(dpdk DEFAULT_MSG
|
|
|
|
DPDK_INCLUDE_DIR
|
2016-08-02 15:50:13 +00:00
|
|
|
check_LIBRARIES)
|
2016-02-03 10:31:45 +00:00
|
|
|
|
|
|
|
if(DPDK_FOUND)
|
2016-08-02 15:50:13 +00:00
|
|
|
if (EXISTS ${WITH_DPDK_MLX5})
|
|
|
|
list(APPEND check_LIBRARIES -libverbs)
|
|
|
|
endif()
|
2016-02-03 10:31:45 +00:00
|
|
|
set(DPDK_LIBRARIES
|
2017-07-05 05:42:10 +00:00
|
|
|
-Wl,--whole-archive ${check_LIBRARIES} -Wl,--no-whole-archive)
|
2016-02-03 10:31:45 +00:00
|
|
|
endif(DPDK_FOUND)
|