diff options
| author | Jan <sentrycraft123@gmail.com> | 2023-08-25 04:33:39 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-24 22:33:39 -0400 |
| commit | 6f05a386f8b2fdd6d6834560efb565acdd99bd02 (patch) | |
| tree | 3b1a66e8dfcc53fb7d913e4092b34bcb4df5b12b /meson.build | |
| parent | cb667af7567a6178e21a6df369eeea1be90b236e (diff) | |
| download | lite-xl-6f05a386f8b2fdd6d6834560efb565acdd99bd02.tar.gz lite-xl-6f05a386f8b2fdd6d6834560efb565acdd99bd02.zip | |
Use Lua wrap by default (#1481)
Debian and all its derivatives ship a broken Lua 5.4 that is missing some symbols.
To work around broken distros and make development and distribution easier use the wrap by default and add an option to use the system version.
Diffstat (limited to 'meson.build')
| -rw-r--r-- | meson.build | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/meson.build b/meson.build index c3b0569c..3cfec808 100644 --- a/meson.build +++ b/meson.build @@ -4,8 +4,7 @@ project('lite-xl', license : 'MIT', meson_version : '>= 0.56', default_options : [ - 'c_std=gnu11', - 'wrap_mode=nofallback' + 'c_std=gnu11' ] ) @@ -84,23 +83,27 @@ if not get_option('source-only') 'lua', # Fedora ] - foreach lua : lua_names - last_lua = (lua == lua_names[-1] or get_option('wrap_mode') == 'forcefallback') - lua_dep = dependency(lua, fallback: last_lua ? ['lua', 'lua_dep'] : [], required : false, - version: '>= 5.4', + if get_option('use_system_lua') + foreach lua : lua_names + last_lua = (lua == lua_names[-1] or get_option('wrap_mode') == 'forcefallback') + lua_dep = dependency(lua, required : false, + ) + if lua_dep.found() + break + endif + + if last_lua + # If we could not find lua on the system and fallbacks are disabled + # try the compiler as a last ditch effort, since Lua has no official + # pkg-config support. + lua_dep = cc.find_library('lua', required : true) + endif + endforeach + else + lua_dep = dependency('', fallback: ['lua', 'lua_dep'], required : true, default_options: default_fallback_options + ['default_library=static', 'line_editing=false', 'interpreter=false'] ) - if lua_dep.found() - break - endif - - if last_lua - # If we could not find lua on the system and fallbacks are disabled - # try the compiler as a last ditch effort, since Lua has no official - # pkg-config support. - lua_dep = cc.find_library('lua', required : true) - endif - endforeach + endif pcre2_dep = dependency('libpcre2-8', fallback: ['pcre2', 'libpcre2_8'], default_options: default_fallback_options + ['default_library=static', 'grep=false', 'test=false'] |
