]>
Commit | Line | Data |
---|---|---|
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 | ||
9 | find_path(DPDK_INCLUDE_DIR rte_config.h | |
10 | PATH_SUFFIXES dpdk) | |
11 | find_library(DPDK_rte_hash_LIBRARY rte_hash) | |
12 | find_library(DPDK_rte_kvargs_LIBRARY rte_kvargs) | |
13 | find_library(DPDK_rte_mbuf_LIBRARY rte_mbuf) | |
14 | find_library(DPDK_rte_ethdev_LIBRARY rte_ethdev) | |
15 | find_library(DPDK_rte_mempool_LIBRARY rte_mempool) | |
16 | find_library(DPDK_rte_ring_LIBRARY rte_ring) | |
17 | find_library(DPDK_rte_eal_LIBRARY rte_eal) | |
18 | find_library(DPDK_rte_cmdline_LIBRARY rte_cmdline) | |
19 | find_library(DPDK_rte_pmd_bond_LIBRARY rte_pmd_bond) | |
20 | find_library(DPDK_rte_pmd_vmxnet3_uio_LIBRARY rte_pmd_vmxnet3_uio) | |
21 | find_library(DPDK_rte_pmd_ixgbe_LIBRARY rte_pmd_ixgbe) | |
22 | find_library(DPDK_rte_pmd_i40e_LIBRARY rte_pmd_i40e) | |
23 | find_library(DPDK_rte_pmd_ring_LIBRARY rte_pmd_ring) | |
24 | find_library(DPDK_rte_pmd_af_packet_LIBRARY rte_pmd_af_packet) | |
25 | ||
26 | set(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 | ||
42 | mark_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 | ||
58 | if (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) | |
62 | endif() | |
63 | ||
64 | include(FindPackageHandleStandardArgs) | |
65 | find_package_handle_standard_args(dpdk DEFAULT_MSG | |
66 | DPDK_INCLUDE_DIR | |
67 | check_LIBRARIES) | |
68 | ||
69 | if(DPDK_FOUND) | |
70 | if (EXISTS ${WITH_DPDK_MLX5}) | |
71 | list(APPEND check_LIBRARIES -libverbs) | |
72 | endif() | |
73 | set(DPDK_LIBRARIES | |
224ce89b | 74 | -Wl,--whole-archive ${check_LIBRARIES} -Wl,--no-whole-archive) |
7c673cae | 75 | endif(DPDK_FOUND) |