numam-dpdk/lib/eal/windows/meson.build
Dmitry Kozlyuk 5ffa86a2b4 build: propagate Windows system dependencies to pkg-config
Windows EAL depends on some system libraries. They were linked using
add_project_link_arguments('-l<LIB>'), which prevented meson from adding
them to Libs.private of pkg-config file. As a result, applications using
pkg-config to find DPDK hit link errors, for example:

    librte_eal.a(eal_windows_eal_debug.c.obj) : error LNK2019: unresolved
    external symbol __imp_SymInitialize referenced in function
    rte_dump_stack

Reference required libraries in EAL using ext_deps meson variable.
bus/pci and net/pcap depend on lib/eal and will pull them automatically.
Drop advapi32 dependency, as MinGW locates VirtualAlloc2() dynamically.

Fixes: 2a5d547a4a ("eal/windows: implement basic memory management")
Fixes: c91717eb75 ("eal/windows: support exit and panic")
Cc: stable@dpdk.org

Reported-by: William Tu <u9012063@gmail.com>
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Tested-by: William Tu <u9012063@gmail.com>
2021-09-14 15:58:34 +02:00

37 lines
826 B
Meson

# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2019 Intel Corporation
subdir('include')
sources += files(
'eal.c',
'eal_alarm.c',
'eal_debug.c',
'eal_dev.c',
'eal_file.c',
'eal_hugepages.c',
'eal_interrupts.c',
'eal_lcore.c',
'eal_log.c',
'eal_memalloc.c',
'eal_memory.c',
'eal_mp.c',
'eal_thread.c',
'eal_timer.c',
'fnmatch.c',
'getopt.c',
'rte_thread.c',
)
dpdk_conf.set10('RTE_EAL_NUMA_AWARE_HUGEPAGES', true)
ext_deps += [
cc.find_library('dbghelp'),
cc.find_library('setupapi'),
cc.find_library('ws2_32'),
]
if is_ms_linker
# Contrary to docs, VirtualAlloc2() is exported by mincore.lib.
ext_deps += cc.find_library('mincore')
endif