From 436339a38dba56a1e9e166d1bc89addc8d6d22ff Mon Sep 17 00:00:00 2001 From: Andrei Alexeyev Date: Sun, 29 Sep 2019 22:02:38 +0300 Subject: [PATCH] Fix meson 0.48.0 compat; require >=0.48.0 and recommend >=0.49.0 --- README.rst | 2 +- meson.build | 12 +++++++++--- src/meson.build | 18 +++++++----------- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/README.rst b/README.rst index fe9f168a64..c8d93f7665 100644 --- a/README.rst +++ b/README.rst @@ -35,7 +35,7 @@ Build-only dependencies ^^^^^^^^^^^^^^^^^^^^^^^ - Python >= 3.5 -- meson >= 0.45.0 (build system; >=0.48.0 recommended) +- meson >= 0.48.0 (build system; >=0.49.0 recommended) Optional: diff --git a/meson.build b/meson.build index 7b057457c5..d126fe0aa5 100644 --- a/meson.build +++ b/meson.build @@ -1,7 +1,7 @@ project('taisei', 'c', license : 'MIT', version : 'v1.4-dev', - meson_version : '>=0.45.0', + meson_version : '>=0.48.0', default_options : [ 'c_std=c11', 'default_library=static', @@ -22,7 +22,7 @@ project('taisei', 'c', ] ) -minimum_recommended_meson_version = '0.48.0' +minimum_recommended_meson_version = '0.49.0' if meson.version().version_compare('<@0@'.format(minimum_recommended_meson_version)) warning('Old Meson version detected. Try upgrading to at least @0@ if the build fails.'.format(minimum_recommended_meson_version)) @@ -145,7 +145,13 @@ taisei_deps = [ # don't add glad here ] -if dep_webpdecoder.found() and get_option('wrap_mode') != 'forcefallback' +if meson.version().version_compare('<0.49.0') + wrap_mode_forcefallback = false +else + wrap_mode_forcefallback = (get_option('wrap_mode') == 'forcefallback') +endif + +if dep_webpdecoder.found() and not wrap_mode_forcefallback # distro libwebpdecoder taisei_deps += dep_webpdecoder else diff --git a/src/meson.build b/src/meson.build index fab9fcbbb8..01ea02dff0 100644 --- a/src/meson.build +++ b/src/meson.build @@ -35,18 +35,14 @@ if host_machine.system() == 'windows' output : 'taisei.rc', ) - if meson.version().version_compare('>=0.47.0') - version_deps += winmod.compile_resources( - rc_target, - depend_files : files( - 'taisei.manifest', - icon_main, - icon_replay, - ) + version_deps += winmod.compile_resources( + rc_target, + depend_files : files( + 'taisei.manifest', + icon_main, + icon_replay, ) - else - version_deps += winmod.compile_resources(rc_target) - endif + ) # msvcrt is dumb and only supports up to c89. # with this defined, alternative implementations from mingw for e.g. the