meson_options: Add readline option

Make it possible to disable code that depends on readline even if
readline is pulled in by another dependency, like bluez.
This commit is contained in:
Jonas Holmberg 2022-11-07 15:35:01 +01:00
parent 02add5b3db
commit 050a51aab3
2 changed files with 6 additions and 2 deletions

View file

@ -260,10 +260,10 @@ cdata.set('HAVE_DBUS', dbus_dep.found())
sdl_dep = dependency('sdl2', required : get_option('sdl2'))
summary({'SDL2 (video examples)': sdl_dep.found()}, bool_yn: true, section: 'Misc dependencies')
drm_dep = dependency('libdrm', required : false)
readline_dep = dependency('readline', required : false)
readline_dep = dependency('readline', required : get_option('readline'))
if not readline_dep.found()
readline_dep = cc.find_library('readline', required: false)
readline_dep = cc.find_library('readline', required : get_option('readline'))
endif
summary({'readline (for pw-cli)': readline_dep.found()}, bool_yn: true, section: 'Misc dependencies')

View file

@ -265,3 +265,7 @@ option('flatpak',
description: 'Enable Flatpak support',
type: 'feature',
value: 'enabled')
option('readline',
description: 'Enable code that depends on libreadline',
type: 'feature',
value: 'auto')