Usa system provided Lua 5.2 if found

This commit is contained in:
Francesco Abbate 2020-06-30 16:48:41 +02:00
parent 0b16ce725c
commit a292793143
1 changed files with 7 additions and 4 deletions

View File

@ -3,11 +3,14 @@ project('lite', 'c', 'cpp', version: '1.06', default_options : ['c_std=gnu11', '
cc = meson.get_compiler('c')
libm = cc.find_library('m', required : false)
libdl = cc.find_library('dl', required : false)
lua_dep = dependency('lua5.2', required : false)
lua_subproject = subproject('lua', default_options: [
if not lua_dep.found()
lua_subproject = subproject('lua', default_options: [
'default_library=static', 'use_readline=false'
])
lua_dep = lua_subproject.get_variable('lua_dep')
])
lua_dep = lua_subproject.get_variable('lua_dep')
endif
sdl_dep = dependency('sdl2', method: 'config-tool')