From 049fff5623720fcd0b4fdc92501b586addbb6b48 Mon Sep 17 00:00:00 2001 From: Sam James Date: Sat, 25 Jan 2025 16:03:12 +0000 Subject: [PATCH] meson: cleanup version detection Tell Meson what version the project is, so that we set the right versioning on libnethogs. --- meson.build | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 81d7b59..16e61b4 100644 --- a/meson.build +++ b/meson.build @@ -5,11 +5,11 @@ project('nethogs', ['c', 'cpp'], default_options : ['warning_level=3', - 'cpp_std=c++14'] + 'cpp_std=c++14'], + version : run_command('./determineVersion.sh').stdout().strip(), ) cc = meson.get_compiler('cpp') -version = run_command('./determineVersion.sh', check: true).stdout().strip() ####################################### ## Dependencies and flags definition ## @@ -19,7 +19,7 @@ projectinc = [include_directories('.', 'src')] # flags c_args = [ - '-DVERSION="' + version + '"' + '-DVERSION="' + meson.project_version() + '"' ] # dependencies @@ -42,5 +42,5 @@ pkgconfig = import('pkgconfig') pkgconfig_install_dir = join_paths(get_option('libdir'), 'pkgconfig') pkgconfig.generate(libnethogs, requires: ['libpcap'], - version: version + version: meson.project_version() )