Commit 85f9863e authored by Max Kellermann's avatar Max Kellermann

meson.build: always enable Wave encoder for Snapcast

Even if the "wave_encoder" option is disabled (and no other encoder plugins are enabled), forcefully enable the Wave encoder (if Snapcast is enabled). Closes https://github.com/MusicPlayerDaemon/MPD/issues/1500
parent 83572701
......@@ -3,6 +3,22 @@ encoder_features = configuration_data()
encoder_features.set('ENABLE_ENCODER', need_encoder)
if not need_encoder
if need_wave_encoder
# Special case for the Snapcast output plugin which only needs the
# PCM wave encoder encoder plugin
encoder_glue = static_library(
'encoder_glue',
'plugins/WaveEncoderPlugin.cxx',
include_directories: inc,
)
encoder_glue_dep = declare_dependency(
link_with: encoder_glue,
)
subdir_done()
endif
encoder_glue_dep = dependency('', required: false)
configure_file(output: 'Features.h', configuration: encoder_features)
subdir_done()
......
......@@ -35,7 +35,7 @@ if libshine_dep.found()
endif
encoder_features.set('ENABLE_WAVE_ENCODER', get_option('wave_encoder'))
if get_option('wave_encoder')
if get_option('wave_encoder') or need_wave_encoder
encoder_plugins_sources += 'WaveEncoderPlugin.cxx'
endif
......
......@@ -10,6 +10,7 @@ output_plugins_deps = [
]
need_encoder = false
need_wave_encoder = false
if alsa_dep.found()
output_plugins_sources += 'AlsaOutputPlugin.cxx'
......@@ -127,9 +128,7 @@ if get_option('snapcast')
output_features.set('HAVE_YAJL', yajl_dep.found())
# TODO: the Snapcast plugin needs just the "wave" encoder, but this
# enables all available encoders
need_encoder = true
need_wave_encoder = true
endif
enable_solaris_output = get_option('solaris_output')
......
......@@ -572,7 +572,7 @@ executable(
# Encoder
#
if encoder_glue_dep.found()
if need_encoder
executable(
'run_encoder',
'run_encoder.cxx',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment