meson: Add option to enable/disable legacy RTKit module

The RTKit module is being replaced by the RT module. Currently, it is
always built if D-Bus is present. For packagers, it can be beneficial to
be able to disable the legacy module. Add a Meson option to allow for
exactly that. Make it enabled by default to not change default behavior.
This commit is contained in:
Carlos Rafael Giani 2022-03-30 19:44:38 +02:00 committed by Wim Taymans
parent f0424c0b99
commit e8f93c3e1e
2 changed files with 5 additions and 1 deletions

View file

@ -237,3 +237,7 @@ option('libcanberra',
description: 'Enable code that depends on libcanberra',
type: 'feature',
value: 'auto')
option('legacy-rtkit',
description: 'Build legacy rtkit module',
type: 'boolean',
value: 'true')

View file

@ -139,7 +139,7 @@ pipewire_module_rt = shared_library('pipewire-module-rt', [ 'module-rt.c' ],
dependencies : [dbus_dep, mathlib, dl_lib, pipewire_dep],
)
build_module_rtkit = dbus_dep.found()
build_module_rtkit = dbus_dep.found() and (get_option('legacy-rtkit') == true)
if build_module_rtkit
# TODO: This serves as a temporary alias to prevent breaking existing setups
# while `module-rtkit` is being migrated to `module-rt`