diff --git a/meson.build b/meson.build index fc66a8e5..a808297f 100644 --- a/meson.build +++ b/meson.build @@ -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: [ - 'default_library=static', 'use_readline=false' -]) -lua_dep = lua_subproject.get_variable('lua_dep') +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') +endif sdl_dep = dependency('sdl2', method: 'config-tool')