Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 049fff5

Browse files
committed
meson: cleanup version detection
Tell Meson what version the project is, so that we set the right versioning on libnethogs.
1 parent 632a788 commit 049fff5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

meson.build

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
project('nethogs',
66
['c', 'cpp'],
77
default_options : ['warning_level=3',
8-
'cpp_std=c++14']
8+
'cpp_std=c++14'],
9+
version : run_command('./determineVersion.sh').stdout().strip(),
910
)
1011

1112
cc = meson.get_compiler('cpp')
12-
version = run_command('./determineVersion.sh', check: true).stdout().strip()
1313

1414
#######################################
1515
## Dependencies and flags definition ##
@@ -19,7 +19,7 @@ projectinc = [include_directories('.', 'src')]
1919

2020
# flags
2121
c_args = [
22-
'-DVERSION="' + version + '"'
22+
'-DVERSION="' + meson.project_version() + '"'
2323
]
2424

2525
# dependencies
@@ -42,5 +42,5 @@ pkgconfig = import('pkgconfig')
4242
pkgconfig_install_dir = join_paths(get_option('libdir'), 'pkgconfig')
4343
pkgconfig.generate(libnethogs,
4444
requires: ['libpcap'],
45-
version: version
45+
version: meson.project_version()
4646
)

0 commit comments

Comments
 (0)