diff --git a/spa/meson.build b/spa/meson.build index 995fbf887..f88b5f9a3 100644 --- a/spa/meson.build +++ b/spa/meson.build @@ -41,14 +41,23 @@ if get_option('spa-plugins').allowed() # plugin-specific dependencies alsa_dep = dependency('alsa', required: get_option('alsa')) summary({'ALSA': alsa_dep.found()}, bool_yn: true, section: 'Backend') + bluez_dep = dependency('bluez', version : '>= 4.101', required: get_option('bluez5')) gio_dep = dependency('gio-2.0', required : get_option('bluez5')) gio_unix_dep = dependency('gio-unix-2.0', required : get_option('bluez5')) - bluez_deps_found = bluez_dep.found() and gio_dep.found() and gio_unix_dep.found() + bluez_glib2_dep = dependency('glib-2.0', required : get_option('bluez5')) + sbc_dep = dependency('sbc', required: get_option('bluez5')) + summary({'SBC': sbc_dep.found()}, bool_yn: true, section: 'Bluetooth audio codecs') + bluez5_deps = [ mathlib, dbus_dep, sbc_dep, bluez_dep, bluez_glib2_dep, gio_dep, gio_unix_dep ] + bluez_deps_found = get_option('bluez5').allowed() + foreach dep: bluez5_deps + if get_option('bluez5').enabled() and not dep.found() + error('bluez5 enabled, but dependency not found: ' + dep.name()) + endif + bluez_deps_found = bluez_deps_found and dep.found() + endforeach summary({'Bluetooth audio': bluez_deps_found}, bool_yn: true, section: 'Backend') if bluez_deps_found - sbc_dep = dependency('sbc', required: get_option('bluez5')) - summary({'SBC': sbc_dep.found()}, bool_yn: true, section: 'Bluetooth audio codecs') 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')) diff --git a/spa/plugins/bluez5/meson.build b/spa/plugins/bluez5/meson.build index f1895701a..085c5b220 100644 --- a/spa/plugins/bluez5/meson.build +++ b/spa/plugins/bluez5/meson.build @@ -1,12 +1,5 @@ gnome = import('gnome') -bluez5_deps = [ mathlib, dbus_dep, glib2_dep, sbc_dep, bluez_dep, gio_dep, gio_unix_dep ] -foreach dep: bluez5_deps - if not dep.found() - subdir_done() - endif -endforeach - cdata.set('HAVE_BLUEZ_5_BACKEND_NATIVE', get_option('bluez5-backend-hsp-native').allowed() or get_option('bluez5-backend-hfp-native').allowed())