]> git.proxmox.com Git - ceph.git/blame - ceph/cmake/modules/Finddpdk.cmake
update sources to v12.1.1
[ceph.git] / ceph / cmake / modules / Finddpdk.cmake
CommitLineData
7c673cae
FG
1# Try to find dpdk
2#
3# Once done, this will define
4#
5# DPDK_FOUND
6# DPDK_INCLUDE_DIR
7# DPDK_LIBRARIES
8
9find_path(DPDK_INCLUDE_DIR rte_config.h
10 PATH_SUFFIXES dpdk)
11find_library(DPDK_rte_hash_LIBRARY rte_hash)
12find_library(DPDK_rte_kvargs_LIBRARY rte_kvargs)
13find_library(DPDK_rte_mbuf_LIBRARY rte_mbuf)
14find_library(DPDK_rte_ethdev_LIBRARY rte_ethdev)
15find_library(DPDK_rte_mempool_LIBRARY rte_mempool)
16find_library(DPDK_rte_ring_LIBRARY rte_ring)
17find_library(DPDK_rte_eal_LIBRARY rte_eal)
18find_library(DPDK_rte_cmdline_LIBRARY rte_cmdline)
19find_library(DPDK_rte_pmd_bond_LIBRARY rte_pmd_bond)
20find_library(DPDK_rte_pmd_vmxnet3_uio_LIBRARY rte_pmd_vmxnet3_uio)
21find_library(DPDK_rte_pmd_ixgbe_LIBRARY rte_pmd_ixgbe)
22find_library(DPDK_rte_pmd_i40e_LIBRARY rte_pmd_i40e)
23find_library(DPDK_rte_pmd_ring_LIBRARY rte_pmd_ring)
24find_library(DPDK_rte_pmd_af_packet_LIBRARY rte_pmd_af_packet)
25
26set(check_LIBRARIES
27 ${DPDK_rte_hash_LIBRARY}
28 ${DPDK_rte_kvargs_LIBRARY}
29 ${DPDK_rte_mbuf_LIBRARY}
30 ${DPDK_rte_ethdev_LIBRARY}
31 ${DPDK_rte_mempool_LIBRARY}
32 ${DPDK_rte_ring_LIBRARY}
33 ${DPDK_rte_eal_LIBRARY}
34 ${DPDK_rte_cmdline_LIBRARY}
35 ${DPDK_rte_pmd_bond_LIBRARY}
36 ${DPDK_rte_pmd_vmxnet3_uio_LIBRARY}
37 ${DPDK_rte_pmd_ixgbe_LIBRARY}
38 ${DPDK_rte_pmd_i40e_LIBRARY}
39 ${DPDK_rte_pmd_ring_LIBRARY}
40 ${DPDK_rte_pmd_af_packet_LIBRARY})
41
42mark_as_advanced(DPDK_INCLUDE_DIR
43 DPDK_rte_hash_LIBRARY
44 DPDK_rte_kvargs_LIBRARY
45 DPDK_rte_mbuf_LIBRARY
46 DPDK_rte_ethdev_LIBRARY
47 DPDK_rte_mempool_LIBRARY
48 DPDK_rte_ring_LIBRARY
49 DPDK_rte_eal_LIBRARY
50 DPDK_rte_cmdline_LIBRARY
51 DPDK_rte_pmd_bond_LIBRARY
52 DPDK_rte_pmd_vmxnet3_uio_LIBRARY
53 DPDK_rte_pmd_ixgbe_LIBRARY
54 DPDK_rte_pmd_i40e_LIBRARY
55 DPDK_rte_pmd_ring_LIBRARY
56 DPDK_rte_pmd_af_packet_LIBRARY)
57
58if (EXISTS ${WITH_DPDK_MLX5})
59 find_library(DPDK_rte_pmd_mlx5_LIBRARY rte_pmd_mlx5)
60 list(APPEND check_LIBRARIES ${DPDK_rte_pmd_mlx5_LIBRARY})
61 mark_as_advanced(DPDK_rte_pmd_mlx5_LIBRARY)
62endif()
63
64include(FindPackageHandleStandardArgs)
65find_package_handle_standard_args(dpdk DEFAULT_MSG
66 DPDK_INCLUDE_DIR
67 check_LIBRARIES)
68
69if(DPDK_FOUND)
70if (EXISTS ${WITH_DPDK_MLX5})
71 list(APPEND check_LIBRARIES -libverbs)
72endif()
73 set(DPDK_LIBRARIES
224ce89b 74 -Wl,--whole-archive ${check_LIBRARIES} -Wl,--no-whole-archive)
7c673cae 75endif(DPDK_FOUND)