meson: allow fallback to find_library for readline detection

Fixes: 050a51aa (" meson_options: Add readline option")

Signed-off-by: Dylan Aïssi <dylan.aissi@collabora.com>
This commit is contained in:
Dylan Aïssi 2024-07-31 15:30:40 +02:00 committed by Wim Taymans
parent b61765eaf4
commit 0c5b2f1154

View file

@ -285,10 +285,14 @@ cdata.set('HAVE_DBUS', dbus_dep.found())
sdl_dep = dependency('sdl2', required : get_option('sdl2')) sdl_dep = dependency('sdl2', required : get_option('sdl2'))
summary({'SDL2 (video examples)': sdl_dep.found()}, bool_yn: true, section: 'Misc dependencies') summary({'SDL2 (video examples)': sdl_dep.found()}, bool_yn: true, section: 'Misc dependencies')
drm_dep = dependency('libdrm', required : false) drm_dep = dependency('libdrm', required : false)
readline_dep = dependency('readline', required : get_option('readline'))
if not readline_dep.found() if get_option('readline').disabled()
readline_dep = cc.find_library('readline', required : get_option('readline')) readline_dep = dependency('', required: false)
else
readline_dep = dependency('readline', required : false)
if not readline_dep.found()
readline_dep = cc.find_library('readline', required : get_option('readline'))
endif
endif endif
# Both the FFmpeg SPA plugin and the pw-cat FFmpeg integration use libavcodec. # Both the FFmpeg SPA plugin and the pw-cat FFmpeg integration use libavcodec.