diff options
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 80 |
1 files changed, 43 insertions, 37 deletions
diff --git a/meson.build b/meson.build index a4ca8e9a82..7ba71a2533 100644 --- a/meson.build +++ b/meson.build @@ -261,47 +261,53 @@ ecore_evas_wayland_engine_include_dir = [] evas_static_list = [] -luaold_interpreters = [ - ['lua', ['>=5.1.0', '<5.3.0']], - ['lua51', ['>=5.1.0', '<5.2.0']], - ['lua-5.1', ['>=5.1.0', '<5.2.0']], - ['lua5.1', ['>=5.1.0', '<5.2.0']], - ['lua52', ['>=5.2.0', '<5.3.0']], - ['lua-5.2', ['>=5.2.0', '<5.3.0']], - ['lua5.2', ['>=5.2.0', '<5.3.0']], -] - -lua_pc_name = '' have_elua = get_option('elua') - -if get_option('lua-interpreter') == 'lua' - config_h.set('ENABLE_LUA_OLD', '1') - foreach l : luaold_interpreters - lua = dependency(l[0], version: l[1], required:false) - lua_pc_name = l[0] - if lua.found() - break +if get_option('lua-interpreter') == 'none' + lua_pc_name = [] + lua = declare_dependency() +else + config_h.set('HAVE_LUA', 1) + luaold_interpreters = [ + ['lua', ['>=5.1.0', '<5.3.0']], + ['lua51', ['>=5.1.0', '<5.2.0']], + ['lua-5.1', ['>=5.1.0', '<5.2.0']], + ['lua5.1', ['>=5.1.0', '<5.2.0']], + ['lua52', ['>=5.2.0', '<5.3.0']], + ['lua-5.2', ['>=5.2.0', '<5.3.0']], + ['lua5.2', ['>=5.2.0', '<5.3.0']], + ] + + lua_pc_name = '' + + if get_option('lua-interpreter') == 'lua' + config_h.set('ENABLE_LUA_OLD', '1') + foreach l : luaold_interpreters + lua = dependency(l[0], version: l[1], required:false) + lua_pc_name = l[0] + if lua.found() + break + endif + endforeach + if not lua.found() + error('Lua not found') endif - endforeach - if not lua.found() - error('Lua not found') - endif - if have_elua - message('Using experimental Elua with interpreter support...') + if have_elua + message('Using experimental Elua with interpreter support...') + endif + else + lua = dependency(get_option('lua-interpreter')) + lua_pc_name = 'luajit' endif -else - lua = dependency(get_option('lua-interpreter')) - lua_pc_name = 'luajit' -endif -if sys_osx and get_option('lua-interpreter') == 'luajit' - # luajit on macro is broken, this means we need to generate our own - # dependency with our arguments, a library later still needs to link to - # luajit for the pagesize argument thingy - lua = declare_dependency( - include_directories: include_directories(lua.get_pkgconfig_variable('includedir')), - link_args: ['-L' + lua.get_pkgconfig_variable('libdir'), '-l' + lua.get_pkgconfig_variable('libname')] - ) + if sys_osx and get_option('lua-interpreter') == 'luajit' + # luajit on macro is broken, this means we need to generate our own + # dependency with our arguments, a library later still needs to link to + # luajit for the pagesize argument thingy + lua = declare_dependency( + include_directories: include_directories(lua.get_pkgconfig_variable('includedir')), + link_args: ['-L' + lua.get_pkgconfig_variable('libdir'), '-l' + lua.get_pkgconfig_variable('libname')] + ) + endif endif subprojects = [ |