Files
nethogs/meson.build
Sam James 5afce747f1 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.
2025-01-25 16:05:20 +00:00

49 lines
1.2 KiB
Meson

#
# See COPYING for more information about licensing
#
project('nethogs',
['c', 'cpp'],
default_options : ['warning_level=3',
'cpp_std=c++14'],
version : run_command('./determineVersion.sh').stdout().strip(),
)
cc = meson.get_compiler('cpp')
#######################################
## Dependencies and flags definition ##
#######################################
# directories
projectinc = [include_directories('.', 'src')]
# flags
c_args = [
'-DVERSION="' + meson.project_version() + '"'
]
# dependencies
thread_dep = dependency('threads', required: true)
libpcap_dep = dependency('libpcap', required: true)
project_deps = [
thread_dep,
libpcap_dep
]
#############################
## Code Compilation ##
#############################
subdir('src')
#############################
## Pkgconfig definition ##
#############################
if get_option('enable-libnethogs').enabled()
pkgconfig = import('pkgconfig')
pkgconfig_install_dir = join_paths(get_option('libdir'), 'pkgconfig')
pkgconfig.generate(libnethogs,
requires: ['libpcap'],
version: meson.project_version()
)
endif