Fix legacy meson version detection.

This commit is contained in:
Mikolaj Paraniak 2018-03-17 11:17:07 +08:00
parent 5c160bebc1
commit 21e4af8edc

View File

@ -2,10 +2,13 @@ project('urbit', 'c', meson_version: '>=0.29.0')
legacy_meson = false
if(meson.version() == '0.29.0')
detect_meson_version = run_command('meson', '--version')
meson_ver = detect_meson_version.stdout()
if(meson_ver == '0.29.0\n')
legacy_meson = true
elif(meson.version() != '0.45.0')
error('Meson 0.29.0 is last legacy version supported. Otherwise please upgrade to 0.45.0.')
elif(meson_ver.version_compare('>=0.40.0'))
error('Meson 0.29.0 is last legacy version supported. Otherwise please upgrade to 0.40.0 or higher.')
endif
jets_a_src = [