From b844678a1da4c237b98b97a8a73c6e22cbb87fa0 Mon Sep 17 00:00:00 2001 From: Elias Souza Date: Sun, 7 Jun 2026 16:30:04 -0300 Subject: [PATCH] spa: meson: Support use ldacBT as encoder library --- spa/meson.build | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/spa/meson.build b/spa/meson.build index b73de72c4..1cbcfed30 100644 --- a/spa/meson.build +++ b/spa/meson.build @@ -73,6 +73,23 @@ if get_option('spa-plugins').allowed() endforeach summary({'Bluetooth audio': bluez_deps_found}, bool_yn: true, section: 'Backend') if bluez_deps_found + ldac_enc_dep = dependency('', required: false) + if get_option('bluez5-codec-ldac').allowed() + ldac_enc_dep = dependency('ldacBT-enc', required : false) + if not ldac_enc_dep.found() + dep = cc.find_library('ldacBT', required : false) + dep = dependency('ldacBT', required : false) + if dep.found() and cc.has_function('ldacBT_encode', dependencies : dep) + ldac_enc_dep = dep + dep = cc.find_library('ldacBT', required : false) + else + dep = cc.find_library('ldacBT', required : false) + if not ldac_enc_dep.found() and get_option('bluez5-codec-ldac').enabled() + error('LDAC encoder library not found') + endif + endif + endif + endif ldac_dep = dependency('ldacBT-enc', required : get_option('bluez5-codec-ldac')) summary({'LDAC': ldac_dep.found()}, bool_yn: true, section: 'Bluetooth audio codecs') ldac_abr_dep = dependency('ldacBT-abr', required : get_option('bluez5-codec-ldac'))