From 92b159e8a2e4af401934fb1d402cc5f4b1ebf469 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Fri, 23 Jun 2023 22:28:57 +0300 Subject: [PATCH 13/13] Meson: Find system-lua in multiple places Lua doesn't have a default pkg-config (etc) and distros are fragmented. Look for it in any of its multitude of hiding places. Reported, and original patch, by Matt Jolly See osdn #48234 Signed-off-by: Marko Lindqvist --- meson.build | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 05fdf47b11..a1882b7ee8 100644 --- a/meson.build +++ b/meson.build @@ -459,7 +459,20 @@ endif icu_dep = dependency('icu-uc') syslua = get_option('syslua') -lua_dep_tmp = dependency('lua-5.4', required:false) + +slua_candidates = [ + 'lua-5.4', + 'lua-54', + 'lua54', + 'lua5.4' +] + +foreach cand : slua_candidates + lua_dep_tmp = dependency(cand, required:false) + if lua_dep_tmp.found() + break + endif +endforeach if syslua != 'false' and lua_dep_tmp.found() lua_inc_path = [] -- 2.40.1