-
-
Notifications
You must be signed in to change notification settings - Fork 289
/
meson.build
46 lines (39 loc) · 1.11 KB
/
meson.build
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
43
44
45
46
#
# See COPYING for more information about licensing
#
project('nethogs',
['c', 'cpp'],
default_options : ['warning_level=3',
'cpp_std=c++14']
)
cc = meson.get_compiler('cpp')
version = run_command('./determineVersion.sh', check: true).stdout().strip()
#######################################
## Dependencies and flags definition ##
#######################################
# directories
projectinc = [include_directories('.', 'src')]
# flags
c_args = [
'-DVERSION="' + 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 ##
#############################
pkgconfig = import('pkgconfig')
pkgconfig_install_dir = join_paths(get_option('libdir'), 'pkgconfig')
pkgconfig.generate(libnethogs,
requires: ['libpcap'],
version: version
)