From d05efe03dc06d18b1a999395c9fb895c34630b4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dylan=20A=C3=AFssi?= Date: Wed, 31 Jul 2024 15:30:40 +0200 Subject: [PATCH] meson: allow fallback to find_library for readline detection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: 050a51aa (" meson_options: Add readline option") Signed-off-by: Dylan Aïssi --- meson.build | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index 0ea256e9b..c7b87deff 100644 --- a/meson.build +++ b/meson.build @@ -282,10 +282,14 @@ 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 : get_option('readline')) -if not readline_dep.found() - readline_dep = cc.find_library('readline', required : get_option('readline')) +if get_option('readline').disabled() + 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 # Both the FFmpeg SPA plugin and the pw-cat FFmpeg integration use libavcodec.