mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
meson: Use feature options everywhere it makes sense
This commit is contained in:
parent
98bedb3895
commit
485bae5eb0
20 changed files with 211 additions and 224 deletions
|
|
@ -77,9 +77,9 @@ executable('pipewire-pulse',
|
|||
# )
|
||||
#endif
|
||||
|
||||
if get_option('media-session')
|
||||
if not get_option('media-session').disabled()
|
||||
subdir('media-session.d')
|
||||
endif
|
||||
if get_option('systemd') and systemd.found()
|
||||
if systemd.found()
|
||||
subdir('systemd')
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
if get_option('systemd-system-service')
|
||||
if not get_option('systemd-system-service').disabled()
|
||||
subdir('system')
|
||||
endif
|
||||
if get_option('systemd-user-service')
|
||||
if not get_option('systemd-user-service').disabled()
|
||||
subdir('user')
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ configure_file(input : 'pipewire.service.in',
|
|||
configuration : systemd_config,
|
||||
install_dir : systemd_system_services_dir)
|
||||
|
||||
if get_option('media-session')
|
||||
if not get_option('media-session').disabled()
|
||||
configure_file(input : 'pipewire-media-session.service.in',
|
||||
output : 'pipewire-media-session.service',
|
||||
configuration : systemd_config,
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ configure_file(input : 'pipewire-pulse.service.in',
|
|||
configuration : systemd_config,
|
||||
install_dir : systemd_user_services_dir)
|
||||
|
||||
if get_option('media-session')
|
||||
if not get_option('media-session').disabled()
|
||||
configure_file(input : 'pipewire-media-session.service.in',
|
||||
output : 'pipewire-media-session.service',
|
||||
configuration : systemd_config,
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ executable('export-spa-device',
|
|||
dependencies : [pipewire_dep, mathlib],
|
||||
)
|
||||
|
||||
if get_option('media-session') and alsa_dep.found()
|
||||
if alsa_dep.found()
|
||||
executable('pipewire-media-session',
|
||||
'media-session/access-flatpak.c',
|
||||
'media-session/access-portal.c',
|
||||
|
|
@ -94,6 +94,8 @@ if get_option('media-session') and alsa_dep.found()
|
|||
install: true,
|
||||
dependencies : [dbus_dep, pipewire_dep, alsa_dep, mathlib],
|
||||
)
|
||||
elif get_option('media-session').enabled() and not alsa_dep.found()
|
||||
error('`media-session` is enabled but required dependency `alsa` not found.')
|
||||
endif
|
||||
|
||||
executable('pw-reserve',
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ pipewire_gst_sources = [
|
|||
'gstpipewiresrc.c',
|
||||
]
|
||||
|
||||
if get_option('gstreamer-device-provider')
|
||||
if not get_option('gstreamer-device-provider').disabled()
|
||||
pipewire_gst_sources += [ 'gstpipewiredeviceprovider.c' ]
|
||||
endif
|
||||
|
||||
|
|
@ -31,7 +31,9 @@ pipewire_gst = shared_library('gstpipewire',
|
|||
pipewire_gst_sources,
|
||||
c_args : pipewire_gst_c_args,
|
||||
include_directories : [configinc, spa_inc],
|
||||
dependencies : [gobject_dep, glib_dep, gio_dep, gst_dep, pipewire_dep],
|
||||
dependencies : [gst_dep, pipewire_dep],
|
||||
install : true,
|
||||
install_dir : '@0@/gstreamer-1.0'.format(get_option('libdir')),
|
||||
)
|
||||
|
||||
plugins = [pipewire_gst]
|
||||
|
|
|
|||
|
|
@ -4,13 +4,11 @@ subdir('extensions')
|
|||
subdir('daemon')
|
||||
subdir('tools')
|
||||
subdir('modules')
|
||||
if get_option('examples')
|
||||
if not get_option('examples').disabled()
|
||||
subdir('examples')
|
||||
endif
|
||||
if get_option('tests')
|
||||
if not get_option('tests').disabled()
|
||||
subdir('tests')
|
||||
endif
|
||||
|
||||
if get_option('gstreamer')
|
||||
subdir('gst')
|
||||
endif
|
||||
subdir('gst')
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ pipewire_module_link_factory = shared_library('pipewire-module-link-factory',
|
|||
|
||||
pipewire_module_protocol_deps = [mathlib, dl_lib, pipewire_dep]
|
||||
|
||||
if get_option('systemd')
|
||||
if systemd_dep.found()
|
||||
pipewire_module_protocol_deps += systemd_dep
|
||||
endif
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ if ncurses_dep.found()
|
|||
)
|
||||
endif
|
||||
|
||||
if get_option('pw-cat') and sndfile_dep.found()
|
||||
if not get_option('pw-cat').disabled() and sndfile_dep.found()
|
||||
|
||||
pwcat_sources = [
|
||||
'pw-cat.c',
|
||||
|
|
@ -80,5 +80,6 @@ if get_option('pw-cat') and sndfile_dep.found()
|
|||
cmd = 'ln -fs @0@ $DESTDIR@1@'.format('pw-cat', dst)
|
||||
meson.add_install_script('sh', '-c', cmd)
|
||||
endforeach
|
||||
|
||||
elif not sndfile_dep.found() and get_option('pw-cat').enabled()
|
||||
error('pw-cat is enabled but required dependency `sndfile` was not found.')
|
||||
endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue