Fix #1125: Lua detection via pkg-config broken
authorColin Clark <colin.clark@cclark.uk>
Fri, 6 Oct 2023 14:29:59 +0000 (15:29 +0100)
committerColin Clark <colin.clark@cclark.uk>
Fri, 6 Oct 2023 14:29:59 +0000 (15:29 +0100)
https://github.com/BestImageViewer/geeqie/issues/1125

- Increase Meson minimum version and use updated dependency feature.

meson.build

index 9f02c5c..a66dc23 100644 (file)
@@ -44,7 +44,7 @@ project(
     'cpp',
     version : run_command('./version.sh', check : true).stdout().strip(),
     license : ['GPL-2.0-or-later'],
-    meson_version : '>=0.56.2',
+    meson_version : '>=1.0.1',
     default_options : ['cpp_std=c++14', 'warning_level=3', 'buildtype=debugoptimized', 'cpp_link_args=-rdynamic']
 )
 
@@ -411,12 +411,7 @@ lua_dep = []
 req_version = '>=5.3'
 option = get_option('lua')
 if not option.disabled()
-    foreach name : ['lua', 'lua5.3', 'lua-5.3', 'lua53']
-        lua_dep = dependency(name, version: req_version, required: get_option('lua'))
-        if lua_dep.found()
-            break
-        endif
-    endforeach
+    lua_dep = dependency('lua', 'lua5.3', 'lua-5.3', 'lua53', version: req_version, required: get_option('lua'))
     if lua_dep.found()
         conf_data.set('HAVE_LUA', 1)
         summary({'lua' : ['lua supported:', true]}, section : 'Configuration', bool_yn : true)