summaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build19
1 files changed, 10 insertions, 9 deletions
diff --git a/meson.build b/meson.build
index 074ed42a66..14a3960f88 100644
--- a/meson.build
+++ b/meson.build
@@ -13,12 +13,19 @@ project('systemd', 'c',
meson_version : '>= 0.60.0',
)
+project_major_version = meson.project_version().split('.')[0].split('~')[0]
+if meson.project_version().contains('.')
+ project_minor_version = meson.project_version().split('.')[-1].split('~')[0]
+else
+ project_minor_version = '0'
+endif
+
libsystemd_version = '0.39.0'
libudev_version = '1.7.9'
conf = configuration_data()
conf.set_quoted('PROJECT_URL', 'https://systemd.io/')
-conf.set('PROJECT_VERSION', meson.project_version().split('~')[0],
+conf.set('PROJECT_VERSION', project_major_version,
description : 'Numerical project version (used where a simple number is expected)')
conf.set_quoted('PROJECT_VERSION_FULL', meson.project_version(), description : 'Full project version')
@@ -1996,7 +2003,7 @@ version_h = vcs_tag(
shared_lib_tag = get_option('shared-lib-tag')
if shared_lib_tag == ''
- shared_lib_tag = meson.project_version().split('~')[0]
+ shared_lib_tag = project_major_version
endif
#####################################################################
@@ -2749,17 +2756,11 @@ foreach exec : public_programs
args : exec.full_path(),
depends: exec)
- version = meson.project_version()
- if name == 'udevadm'
- # For compatibility reasons we can't use the full version in udevadm.
- version = version.split('~')[0]
- endif
-
test('check-version-' + name,
check_version,
suite : 'dist',
args : [exec.full_path(),
- version],
+ project_major_version],
depends: exec)
endif
endforeach