aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/dpdk/0002-fix-dependencies.patch
blob: b3f78a586686be0cf694869554b127d4f37d1021 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
diff --git a/config/meson.build b/config/meson.build
index 34b85f10b5..5ed4625d9e 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -236,12 +236,10 @@ if meson.is_cross_build() and not meson.get_external_property('numa', true)
     find_libnuma = false
 endif
 if find_libnuma
-    numa_dep = cc.find_library('numa', required: false)
-    if numa_dep.found() and cc.has_header('numaif.h')
+    numa_dep = dependency('numa', method: 'pkg-config')
+    if numa_dep.found()
         dpdk_conf.set10('RTE_HAS_LIBNUMA', true)
         has_libnuma = true
-        add_project_link_arguments('-lnuma', language: 'c')
-        dpdk_extra_ldflags += '-lnuma'
     endif
 endif
 
diff --git a/lib/eal/linux/meson.build b/lib/eal/linux/meson.build
index e99ebed256..672c70547b 100644
--- a/lib/eal/linux/meson.build
+++ b/lib/eal/linux/meson.build
@@ -21,5 +21,6 @@ sources += files(
 
 deps += ['kvargs', 'telemetry']
 if has_libnuma
+    ext_deps += numa_dep
     dpdk_conf.set10('RTE_EAL_NUMA_AWARE_HUGEPAGES', true)
 endif
diff --git a/lib/vhost/meson.build b/lib/vhost/meson.build
index 51bcf17244..1099a0232f 100644
--- a/lib/vhost/meson.build
+++ b/lib/vhost/meson.build
@@ -6,6 +6,7 @@ if not is_linux
     reason = 'only supported on Linux'
 endif
 if has_libnuma
+    ext_deps += numa_dep
     dpdk_conf.set10('RTE_LIBRTE_VHOST_NUMA', true)
 endif
 if (toolchain == 'gcc' and cc.version().version_compare('>=8.3.0'))