meson: make --force-fallback-for=luajit work

This option makes the dependency() call resolve to the subproject
which breaks the Lua 5.2 compatibility check.
This change just ignores the result of the dependency() call
if it resolves to the subproject and then re-fetches it
with a subproject() call later.
Alternatively we could explicitly handle the case where dependency()
resolves to the subproject, but that's just extra code for no
observable difference in behaviour.
This commit is contained in:
Myaamori 2021-05-23 22:33:27 +01:00 committed by Ryan Lucia
parent 28e3e75c44
commit 2c927bac32

View file

@ -251,7 +251,7 @@ conf_platform = configuration_data()
conf_platform.set('DEFAULT_PLAYER_AUDIO', def_audio)
luajit = dependency('luajit', version: '>=2.0.0', required: get_option('system_luajit'))
if luajit.found()
if luajit.found() and luajit.type_name() != 'internal'
luajit_test = cc.run('''#include <lauxlib.h>
int main(void)
{