Browse Source

meson: changes meson switches for controlling session manager

Some distributions set --auto_features=enabled which messes with the
internal logic of the build system when features are used for other
purposes than pure dependency control. The only solution is to either
avoid the value auto or change the type of the option to non-feature.

This commit does the later by replacing -Dmedia-session, -Dwireplumber
and -Dsession-manager with the new -Dsession-managers array and
-Ddefault-session-manager combo options.

Fixes #1333
Fixes #1336
lines
Niklāvs Koļesņikovs 1 year ago
committed by Wim Taymans
parent
commit
d7cddbdb61
6 changed files with 35 additions and 28 deletions
  1. +1
    -1
      .cirrus.yml
  2. +7
    -10
      meson_options.txt
  3. +24
    -14
      src/daemon/meson.build
  4. +1
    -1
      src/daemon/systemd/system/meson.build
  5. +1
    -1
      src/daemon/systemd/user/meson.build
  6. +1
    -1
      src/examples/meson.build

+ 1
- 1
.cirrus.yml View File

@ -18,7 +18,7 @@ task:
build_script:
- mkdir build
- cd build
- meson setup -Dalsa=enabled -Dpipewire-alsa=enabled -Dbluez5=disabled -Djack=disabled -Dmedia-session=enabled -Dpipewire-jack=disabled -Dpw-cat=enabled -Dv4l2=disabled -Dsdl2=enabled -Dsystemd=disabled ..
- meson setup -Dalsa=enabled -Dpipewire-alsa=enabled -Dbluez5=disabled -Djack=disabled -Dpipewire-jack=disabled -Dpw-cat=enabled -Dv4l2=disabled -Dsdl2=enabled -Dsystemd=disabled -Dsession-managers=media-session -Ddefault-session-manager=media-session ..
- ninja
test_script:
- cd build


+ 7
- 10
meson_options.txt View File

@ -199,16 +199,13 @@ option('libusb',
description: 'Enable code that depends on libusb',
type: 'feature',
value: 'auto')
option('media-session',
description: 'Build and install pipewire-media-session',
type: 'feature',
value: 'enabled')
option('wireplumber',
description: 'Build and install wireplumber (subproject)',
type: 'feature',
value: 'auto')
option('session-manager',
description : 'Session manager to build and use in the uninstalled environment',
option('session-managers',
description : 'Session managers to build (can be [] for none)',
type : 'array',
choices : ['media-session', 'wireplumber'],
value : ['media-session'])
option('default-session-manager',
description : 'Default session manager (leave as-is if none are built)',
type : 'combo',
choices : ['media-session', 'wireplumber'],
value : 'media-session')

+ 24
- 14
src/daemon/meson.build View File

@ -24,24 +24,34 @@ conf_config_uninstalled.set('pipewire_pulse_path',
meson.build_root() / 'src' / 'daemon' / 'pipewire-pulse')
conf_config_uninstalled.set('comment', '')
# Build WirePlumber if requested, and set it up in the config files
build_wp = get_option('wireplumber')
sm_choice = get_option('session-manager')
build_ms = get_option('session-managers').contains('media-session')
build_wp = get_option('session-managers').contains('wireplumber')
sm_choice = get_option('default-session-manager')
if sm_choice == 'media-session'
if get_option('session-managers') == []
warning(' to use pw-uninstalled.sh manually edit pipewire-uninstalled.conf')
elif not build_ms
error('media-session is the chosen session manager but it won\'t be built')
endif
endif
if build_wp.disabled() and (sm_choice == 'wireplumber')
error('option to build wireplumber is disabled, ' +
if not build_wp and (sm_choice == 'wireplumber')
error('building of the wireplumber subproject is disabled, ' +
'but the requested session-manager is wireplumber')
elif build_wp.enabled() or (build_wp.auto() and (sm_choice == 'wireplumber'))
elif build_wp
wp_proj = subproject('wireplumber', required : true)
wp_bindir = wp_proj.get_variable('wireplumber_bin_dir', pipewire_bindir)
if sm_choice == 'wireplumber'
wp_bindir = wp_proj.get_variable('wireplumber_bin_dir', pipewire_bindir)
conf_config.set('session_manager_path', wp_bindir / 'wireplumber')
conf_config.set('session_manager_path', wp_bindir / 'wireplumber')
# wp-uninstalled.sh -b path/to/wp/build/root wireplumber
conf_config_uninstalled.set('session_manager_path',
meson.source_root() / 'subprojects' / 'wireplumber' / 'wp-uninstalled.sh')
conf_config_uninstalled.set('session_manager_args',
'-b ' + meson.build_root() / 'subprojects' / 'wireplumber' + ' wireplumber')
# wp-uninstalled.sh -b path/to/wp/build/root wireplumber
conf_config_uninstalled.set('session_manager_path',
meson.source_root() / 'subprojects' / 'wireplumber' / 'wp-uninstalled.sh')
conf_config_uninstalled.set('session_manager_args',
'-b ' + meson.build_root() / 'subprojects' / 'wireplumber' + ' wireplumber')
endif
endif
conf_files = [
@ -106,7 +116,7 @@ custom_target('pipewire-uninstalled',
#endif
subdir('filter-chain')
if not get_option('media-session').disabled()
if build_ms
subdir('media-session.d')
endif
if systemd.found()


+ 1
- 1
src/daemon/systemd/system/meson.build View File

@ -12,7 +12,7 @@ configure_file(input : 'pipewire.service.in',
configuration : systemd_config,
install_dir : systemd_system_services_dir)
if not get_option('media-session').disabled()
if get_option('session-managers').contains('media-session')
configure_file(input : 'pipewire-media-session.service.in',
output : 'pipewire-media-session.service',
configuration : systemd_config,


+ 1
- 1
src/daemon/systemd/user/meson.build View File

@ -22,7 +22,7 @@ configure_file(input : 'pipewire-pulse.service.in',
configuration : systemd_config,
install_dir : systemd_user_services_dir)
if not get_option('media-session').disabled()
if get_option('session-managers').contains('media-session')
configure_file(input : 'pipewire-media-session.service.in',
output : 'pipewire-media-session.service',
configuration : systemd_config,


+ 1
- 1
src/examples/meson.build View File

@ -56,7 +56,7 @@ executable('export-spa-device',
dependencies : [pipewire_dep, mathlib],
)
if not get_option('media-session').disabled() and alsa_dep.found()
if get_option('session-managers').contains('media-session') and alsa_dep.found()
sm_logind_src = []
sm_logind_dep = []
if systemd.found() and systemd_dep.found()


Loading…
Cancel
Save