meson: fix build with libnethogs disabled

Fix `meson.build:43:19: ERROR: Unknown variable "libnethogs".`.

While src/ has this correct, the top-level meson.build wasn't right.
This commit is contained in:
Sam James
2025-01-25 16:05:20 +00:00
parent 049fff5623
commit 5afce747f1

View File

@@ -38,9 +38,11 @@ subdir('src')
############################# #############################
## Pkgconfig definition ## ## Pkgconfig definition ##
############################# #############################
pkgconfig = import('pkgconfig') if get_option('enable-libnethogs').enabled()
pkgconfig_install_dir = join_paths(get_option('libdir'), 'pkgconfig') pkgconfig = import('pkgconfig')
pkgconfig.generate(libnethogs, pkgconfig_install_dir = join_paths(get_option('libdir'), 'pkgconfig')
requires: ['libpcap'], pkgconfig.generate(libnethogs,
version: meson.project_version() requires: ['libpcap'],
) version: meson.project_version()
)
endif