use lua fallback earlier when fallbacks are forced

This commit is contained in:
Jan200101 2022-01-15 01:00:51 +01:00
parent 8c8bd4692c
commit 227ca7d0e5
No known key found for this signature in database
GPG Key ID: 5B71B1D78B882E05
1 changed files with 8 additions and 1 deletions

View File

@ -51,7 +51,14 @@ if not get_option('source-only')
libdl = cc.find_library('dl', required : false)
threads_dep = dependency('threads')
lua_dep = dependency('lua5.4', required : false)
lua_fallback = ['lua', 'lua_dep']
lua_quick_fallback = []
if get_option('wrap_mode') == 'forcefallback'
lua_quick_fallback = lua_fallback
endif
lua_dep = dependency('lua5.4', fallback: lua_quick_fallback, required : false)
if not lua_dep.found()
lua_dep = dependency('lua', fallback: ['lua', 'lua_dep'],
default_options: ['default_library=static', 'line_editing=false', 'interpreter=false']