mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
treewide: meson.build: use feature.allowed()
Since meson 0.59.0, a feature object has an `allowed()` method which returns true when the feature is set to 'enabled' or 'auto'. Utilize that instead of the previously used not feature.disabled()
This commit is contained in:
parent
15e7a61aa7
commit
cc73053512
10 changed files with 35 additions and 35 deletions
|
|
@ -6,12 +6,12 @@ foreach dep: bluez5_deps
|
|||
endforeach
|
||||
|
||||
cdata.set('HAVE_BLUEZ_5_BACKEND_NATIVE',
|
||||
not get_option('bluez5-backend-hsp-native').disabled() or
|
||||
not get_option('bluez5-backend-hfp-native').disabled())
|
||||
cdata.set('HAVE_BLUEZ_5_BACKEND_HSP_NATIVE', not get_option('bluez5-backend-hsp-native').disabled())
|
||||
cdata.set('HAVE_BLUEZ_5_BACKEND_HFP_NATIVE', not get_option('bluez5-backend-hfp-native').disabled())
|
||||
cdata.set('HAVE_BLUEZ_5_BACKEND_OFONO', not get_option('bluez5-backend-ofono').disabled())
|
||||
cdata.set('HAVE_BLUEZ_5_BACKEND_HSPHFPD', not get_option('bluez5-backend-hsphfpd').disabled())
|
||||
get_option('bluez5-backend-hsp-native').allowed() or
|
||||
get_option('bluez5-backend-hfp-native').allowed())
|
||||
cdata.set('HAVE_BLUEZ_5_BACKEND_HSP_NATIVE', get_option('bluez5-backend-hsp-native').allowed())
|
||||
cdata.set('HAVE_BLUEZ_5_BACKEND_HFP_NATIVE', get_option('bluez5-backend-hfp-native').allowed())
|
||||
cdata.set('HAVE_BLUEZ_5_BACKEND_OFONO', get_option('bluez5-backend-ofono').allowed())
|
||||
cdata.set('HAVE_BLUEZ_5_BACKEND_HSPHFPD', get_option('bluez5-backend-hsphfpd').allowed())
|
||||
cdata.set('HAVE_BLUEZ_5_HCI', dependency('bluez', version: '< 6', required: false).found())
|
||||
|
||||
bluez5_sources = [
|
||||
|
|
@ -34,18 +34,18 @@ bluez5_data = ['bluez-hardware.conf']
|
|||
|
||||
install_data(bluez5_data, install_dir : spa_datadir / 'bluez5')
|
||||
|
||||
if not get_option('bluez5-backend-hsp-native').disabled() or not get_option('bluez5-backend-hfp-native').disabled()
|
||||
if get_option('bluez5-backend-hsp-native').allowed() or get_option('bluez5-backend-hfp-native').allowed()
|
||||
if libusb_dep.found()
|
||||
bluez5_deps += libusb_dep
|
||||
endif
|
||||
bluez5_sources += ['backend-native.c']
|
||||
endif
|
||||
|
||||
if not get_option('bluez5-backend-ofono').disabled()
|
||||
if get_option('bluez5-backend-ofono').allowed()
|
||||
bluez5_sources += ['backend-ofono.c']
|
||||
endif
|
||||
|
||||
if not get_option('bluez5-backend-hsphfpd').disabled()
|
||||
if get_option('bluez5-backend-hsphfpd').allowed()
|
||||
bluez5_sources += ['backend-hsphfpd.c']
|
||||
endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue