Skip to content
Snippets Groups Projects
Commit 40ce5f0d authored by George Kiagiadakis's avatar George Kiagiadakis
Browse files

meson: add 'system-lua' project option to toggle the bundled lua

By default system-lua=false, so the bundled version is built.

The default_library for the lua subproject is also set to static
now, so that we don't need to install liblua and mess up the system.
For existing build trees, this needs to be switched manually now with
-Dlua:default_library=static (or just wipe the build dir and start clean)
parent a3a787c5
No related branches found
No related tags found
No related merge requests found
project('wireplumber', ['c', 'cpp'],
version : '0.3.50',
license : 'MIT',
meson_version : '>= 0.51.0',
meson_version : '>= 0.54.0',
default_options : [
'warning_level=1',
'buildtype=debugoptimized',
......@@ -40,19 +40,20 @@ gio_dep = dependency('gio-2.0', version : '== ' + gobject_dep.version())
giounix_dep = dependency('gio-unix-2.0', version : '== ' + gobject_dep.version())
pipewire_dep = dependency('libpipewire-0.3', version: '>= 0.3.20')
lua_dep = dependency('lua', version: ['>=5.3.0', '<5.4.0'], required: false)
if not lua_dep.found()
if get_option('system-lua')
lua_dep = dependency('lua', version: ['>=5.3.0', '<5.4.0'], required: false)
if not lua_dep.found()
lua_dep = dependency('lua5.3', required: false)
if not lua_dep.found()
lua_dep = dependency('lua-5.3', required: false)
if not lua_dep.found()
lua_dep = dependency('lua53', required: false)
if not lua_dep.found()
lua_proj = subproject('lua')
lua_dep = lua_proj.get_variable('lua_dep')
endif
endif
lua_dep = dependency('lua53', required: false)
if not lua_dep.found()
lua_dep = dependency('lua-5.3', required: true , allow_fallback: false)
endif
endif
endif
else
lua_proj = subproject('lua', default_options: ['default_library=static'])
lua_dep = lua_proj.get_variable('lua_dep')
endif
gnome = import('gnome')
......
......@@ -2,3 +2,5 @@ option('introspection', type : 'feature', value : 'auto',
description : 'Generate gobject-introspection bindings')
option('doc', type : 'feature', value : 'auto',
description: 'Enable documentation.')
option('system-lua', type : 'boolean', value : 'false',
description : 'Use lua from the system instead of the bundled one')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment