From a292793143e6a206798dd1a50a78397aa8c0fe86 Mon Sep 17 00:00:00 2001 From: Francesco Abbate Date: Tue, 30 Jun 2020 16:48:41 +0200 Subject: [PATCH] Usa system provided Lua 5.2 if found --- meson.build | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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')