Add luajit as an optional subproject

This commit is contained in:
Francesco Abbate 2021-03-21 23:44:36 +01:00
parent 3853bf73d7
commit 198642b0cf
2 changed files with 6 additions and 2 deletions

View File

@ -5,7 +5,11 @@ libm = cc.find_library('m', required : false)
libdl = cc.find_library('dl', required : false)
if get_option('luajit')
lua_dep = dependency('luajit')
lua_dep = dependency('luajit', required : false)
if not lua_dep.found()
lua_subproject = subproject('luajit', default_options: ['portable=true', 'default_library=static', 'app=false'])
lua_dep = lua_subproject.get_variable('lua_dep')
endif
else
lua_dep = dependency('lua5.2', required : false)
if not lua_dep.found()

View File

@ -1,5 +1,5 @@
[wrap-git]
directory = luajit
url = https://github.com/franko/luajit
revision = v2.0.5-lhelper2
revision = v2.0.5-test-1