meson build cannot find the header rte_latencystats.h when build DPDK
first time or never installed DPDK lib after build via meson/ninja.

Because the corresponding header directory isn't included after enabled
RTE_LIBRTE_LATENCY_STATS flag.

Add the lib 'latencystats' to deps of meson.build of test-pmd, the
corresponding header files will be included automatically.

Fixes: 62d3216d6194 ("app/testpmd: add latency statistics calculation")

Signed-off-by: SteveX Yang <stevex.y...@intel.com>
---
v2:
removed long cflags and added 'latencystats' as a dependency of testpmd
---

 app/test-pmd/meson.build | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/app/test-pmd/meson.build b/app/test-pmd/meson.build
index ea56e547b..92b425c27 100644
--- a/app/test-pmd/meson.build
+++ b/app/test-pmd/meson.build
@@ -25,6 +25,9 @@ sources = files('5tswap.c',
        'util.c')
 
 deps += ['ethdev', 'gro', 'gso', 'cmdline', 'metrics', 'meter', 'bus_pci']
+if dpdk_conf.has('RTE_LIBRTE_LATENCYSTATS')
+       deps += 'latencystats'
+endif
 if dpdk_conf.has('RTE_LIBRTE_PDUMP')
        deps += 'pdump'
 endif
-- 
2.17.1

Reply via email to