Explicitly require Meson >= 0.45.0 to build

Closes #117
This commit is contained in:
Andrei Alexeyev 2018-04-17 19:32:02 +03:00
parent 493b75c904
commit c460b45b28
No known key found for this signature in database
GPG key ID: 363707CD4C7FE8A4
4 changed files with 11 additions and 7 deletions

View file

@ -26,7 +26,7 @@ Dependencies
Build-only dependencies
^^^^^^^^^^^^^^^^^^^^^^^
- meson >= 0.39.0 (build system)
- meson >= 0.45.0 (build system)
- Python >= 3.4
- pkg-config
- docutils (optional, for documentation)

View file

@ -13,6 +13,12 @@ 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()
@ -47,7 +53,7 @@ eolconv = find_program(join_paths(scripts_dir, 'eolconv.py'))
taisei_version_result = run_command(version_command, '{string}')
if taisei_version_result.stderr() != ''
message(taisei_version_result.stderr().strip())
warning(taisei_version_result.stderr().strip())
endif
if taisei_version_result.returncode() != 0

View file

@ -108,10 +108,10 @@ if get_option('validate_glsl') != 'false'
if test_result.returncode() == 0
validate_glsl = true
else
message(test_result.stderr())
warning(test_result.stderr())
if get_option('validate_glsl') == 'auto'
message('glslc test failed, you probably have an incompatible version. GLSL validation will be disabled.')
warning('glslc test failed, you probably have an incompatible version. GLSL validation will be disabled.')
else
error('glslc test failed, you probably have an incompatible version.')
endif

View file

@ -9,8 +9,6 @@ version_deps += custom_target('version information',
if host_machine.system() == 'windows'
winmod = import('windows')
# NOTE: this code requires https://github.com/mesonbuild/meson/pull/2815
rcpath = join_paths(meson.current_build_dir(), 'taisei.rc')
rcdefs = [
'-DICONS_DIR=@0@'.format(join_paths(meson.source_root(), 'misc', 'icons'))
@ -54,7 +52,7 @@ if use_intel_intrin
message('SSE 4.2 intrinsics will be used')
elif get_option('intel_intrin')
config.set('TAISEI_BUILDCONF_USE_SSE42', false)
message('SSE 4.2 intrinsics can not be used')
warning('SSE 4.2 intrinsics can not be used')
endif
taisei_src = files(