require meson version in a non-stupid way

This commit is contained in:
Andrei Alexeyev 2018-05-15 03:33:38 +03:00
parent 2932247249
commit 05a41c5047
No known key found for this signature in database
GPG key ID: 363707CD4C7FE8A4

View file

@ -1,7 +1,7 @@
project('taisei', 'c',
license : 'MIT',
version : 'v1.2',
meson_version : '>=0.39.0',
meson_version : '>=0.45.0',
default_options : [
'c_std=gnu11',
@ -13,12 +13,6 @@ project('taisei', 'c',
]
)
meson_required = '0.45.0'
if meson.version().version_compare('<@0@'.format(meson_required))
error('Your Meson version is too old: @0@; at least @1@ is required. Please update.'.format(meson.version(), meson_required))
endif
ver_fb = get_option('version_fallback').strip()
version_fallback = ver_fb != '' ? ver_fb : meson.project_version()