From 19c15e2e908ce8c554a928b71c3cc6505331b1f6 Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Thu, 9 Jan 2025 15:28:53 -0500 Subject: [PATCH] meson: Correctly use fallback for webrtc-audio-processing If system deps are not found, we need to fallback to webrtc-audio-processing-2, not webrtc-audio-processing (i.e. 0.3). Fixes: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/4493 --- meson.build | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index fe3efb5f8..5de0d53fc 100644 --- a/meson.build +++ b/meson.build @@ -449,9 +449,18 @@ else else webrtc_dep = dependency('webrtc-audio-processing', version : ['>= 0.2', '< 1.0'], - required : get_option('echo-cancel-webrtc')) + required : false) cdata.set('HAVE_WEBRTC', webrtc_dep.found()) - summary({'WebRTC Echo Canceling < 1.0': webrtc_dep.found()}, bool_yn: true, section: 'Misc dependencies') + if webrtc_dep.found() + summary({'WebRTC Echo Canceling < 1.0': webrtc_dep.found()}, bool_yn: true, section: 'Misc dependencies') + else + # If deps are not found on the system but it's enabled, try to fallback to the subproject + webrtc_dep = dependency('webrtc-audio-processing-2', + version : ['>= 2.0' ], + required : get_option('echo-cancel-webrtc')) + cdata.set('HAVE_WEBRTC2', webrtc_dep.found()) + summary({'WebRTC Echo Canceling > 2.0': webrtc_dep.found()}, bool_yn: true, section: 'Misc dependencies') + endif endif endif endif