mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04: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
|
|
@ -31,7 +31,7 @@ pkgconfig.generate(filebase : 'lib@0@'.format(spa_name),
|
|||
|
||||
subdir('include')
|
||||
|
||||
if not get_option('spa-plugins').disabled()
|
||||
if get_option('spa-plugins').allowed()
|
||||
udevrulesdir = get_option('udevrulesdir')
|
||||
if udevrulesdir == ''
|
||||
# absolute path, otherwise meson prepends the prefix
|
||||
|
|
@ -74,6 +74,6 @@ endif
|
|||
|
||||
subdir('tools')
|
||||
subdir('tests')
|
||||
if not get_option('examples').disabled()
|
||||
if get_option('examples').allowed()
|
||||
subdir('examples')
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
if alsa_dep.found()
|
||||
subdir('alsa')
|
||||
endif
|
||||
if not get_option('audioconvert').disabled()
|
||||
if get_option('audioconvert').allowed()
|
||||
subdir('audioconvert')
|
||||
endif
|
||||
if not get_option('audiomixer').disabled()
|
||||
if get_option('audiomixer').allowed()
|
||||
subdir('audiomixer')
|
||||
endif
|
||||
if not get_option('control').disabled()
|
||||
if get_option('control').allowed()
|
||||
subdir('control')
|
||||
endif
|
||||
if not get_option('audiotestsrc').disabled()
|
||||
if get_option('audiotestsrc').allowed()
|
||||
subdir('audiotestsrc')
|
||||
endif
|
||||
if bluez_dep.found()
|
||||
|
|
@ -22,19 +22,19 @@ endif
|
|||
if jack_dep.found()
|
||||
subdir('jack')
|
||||
endif
|
||||
if not get_option('support').disabled()
|
||||
if get_option('support').allowed()
|
||||
subdir('support')
|
||||
endif
|
||||
if not get_option('test').disabled()
|
||||
if get_option('test').allowed()
|
||||
subdir('test')
|
||||
endif
|
||||
if not get_option('videoconvert').disabled()
|
||||
if get_option('videoconvert').allowed()
|
||||
subdir('videoconvert')
|
||||
endif
|
||||
if not get_option('videotestsrc').disabled()
|
||||
if get_option('videotestsrc').allowed()
|
||||
subdir('videotestsrc')
|
||||
endif
|
||||
if not get_option('volume').disabled()
|
||||
if get_option('volume').allowed()
|
||||
subdir('volume')
|
||||
endif
|
||||
if vulkan_headers
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ spa_support_lib = shared_library('spa-support',
|
|||
install_dir : spa_plugindir / 'support')
|
||||
spa_support_dep = declare_dependency(link_with: spa_support_lib)
|
||||
|
||||
if not get_option('evl').disabled()
|
||||
if get_option('evl').allowed()
|
||||
evl_inc = include_directories('/usr/evl/include')
|
||||
evl_lib = cc.find_library('evl',
|
||||
dirs: ['/usr/evl/lib/'],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue