Fix auto-replace to respect whole-word matches

This commit is contained in:
2026-05-05 17:22:56 -06:00
parent 1dc9b9c956
commit cc8460d366
2 changed files with 42 additions and 1 deletions

View File

@@ -1,7 +1,19 @@
if cc.get_id() == 'msvc'
lua_dep = cc.find_library('lua51')
else
lua_dep = dependency(get_option('with-lua'))
lua_opt = get_option('with-lua')
lua_dep = dependency(lua_opt, required: false)
if not lua_dep.found() and lua_opt == 'lua-5.4'
foreach lua_name : ['lua5.4', 'lua-5.3', 'lua5.3', 'lua']
lua_dep = dependency(lua_name, required: false)
if lua_dep.found()
break
endif
endforeach
endif
if not lua_dep.found()
error('Dependency "' + lua_opt + '" not found')
endif
endif
shared_module('lua', 'lua.c',