summary('lua', get_option('lua'), section : 'Loader Support', bool_yn : true) if not get_option('introspection') error('Lua plugin requires GObject Introspection.') # These are ordered from most to least preferred, which would normally # be from the highest to lowest version. LUA = dependency(_LUA[0], version : _LUA[1], required : false) # Compile and run our lua-lgi test program lua_lgi_test = compiler.run(files('gplugin-lua-test-lgi.c'), name : 'lua "lgi" module') if lua_lgi_test.compiled() and lua_lgi_test.returncode() == 0 error('No usable Lua library was found') shared_library('gplugin-lua', c_args : ['-DG_LOG_USE_STRUCTURED', '-DG_LOG_DOMAIN="GPlugin-Lua"'], dependencies : [LUA, gplugin_dep], install_dir : get_option('libdir') / 'gplugin' # Add the loader's path to our environment variable devenv.append('GPLUGIN_PLUGIN_PATH', meson.current_build_dir())