diff --git a/spa/meson.build b/spa/meson.build index 712caf126..263af4c25 100644 --- a/spa/meson.build +++ b/spa/meson.build @@ -19,11 +19,13 @@ if not get_option('spa-plugins').disabled() # plugin-specific dependencies alsa_dep = dependency('alsa', required: get_option('alsa')) bluez_dep = dependency('bluez', version : '>= 4.101', required: get_option('bluez5')) - sbc_dep = dependency('sbc', required: get_option('bluez5')) - ldac_dep = dependency('ldacBT-enc', required : get_option('bluez5').enabled() and get_option('bluez5-codec-ldac')) - ldac_abr_dep = dependency('ldacBT-abr', required : get_option('bluez5').enabled() and get_option('bluez5-codec-ldac')) - aptx_dep = dependency('libopenaptx', version : '< 0.2.1', required : get_option('bluez5').enabled() and get_option('bluez5-codec-aptx')) - fdk_aac_dep = dependency('fdk-aac', required : get_option('bluez5').enabled() and get_option('bluez5-codec-aac')) + if bluez_dep.found() + sbc_dep = dependency('sbc', required: get_option('bluez5')) + ldac_dep = dependency('ldacBT-enc', required : get_option('bluez5-codec-ldac')) + ldac_abr_dep = dependency('ldacBT-abr', required : get_option('bluez5-codec-ldac')) + aptx_dep = dependency('libopenaptx', version : '< 0.2.1', required : get_option('bluez5-codec-aptx')) + fdk_aac_dep = dependency('fdk-aac', required : get_option('bluez5-codec-aac')) + endif avcodec_dep = dependency('libavcodec', required: get_option('ffmpeg')) jack_dep = dependency('jack', version : '>= 1.9.10', required: get_option('jack')) vulkan_dep = dependency('vulkan', disabler : true, version : '>= 1.1.69', required: get_option('vulkan')) diff --git a/spa/plugins/meson.build b/spa/plugins/meson.build index 80cb89bce..c54304f39 100644 --- a/spa/plugins/meson.build +++ b/spa/plugins/meson.build @@ -13,7 +13,9 @@ endif if not get_option('audiotestsrc').disabled() subdir('audiotestsrc') endif -subdir('bluez5') +if bluez_dep.found() + subdir('bluez5') +endif if avcodec_dep.found() subdir('ffmpeg') endif