lib/xiph/meson.build: the Vorbis encoder requires the Vorbis decoder

Without the Vorbis decoder, `libvorbis` is never detected, leading to
linker failures when attempting to build the Vorbis encoder.
This commit is contained in:
Max Kellermann 2018-11-04 12:21:23 +01:00
parent 8e66b855a3
commit 86f1074905
2 changed files with 11 additions and 4 deletions

2
NEWS
View File

@ -4,6 +4,8 @@ ver 0.21.1 (not yet released)
* decoder
- ffmpeg: fix build failure with non-standard FFmpeg installation path
- flac: fix linker failure when building without FLAC support
* encoder
- vorbis: fix linker failure when building without Vorbis decoder
* fix build failure on Linux-PowerPC
* fix build failure on FreeBSD
* eliminate DLL dependencies on Windows

View File

@ -2,10 +2,15 @@ libflac_dep = dependency('flac', version: '>= 1.2', required: get_option('flac')
libopus_dep = dependency('opus', required: get_option('opus'))
libvorbis_dep = dependency('vorbis', required: get_option('vorbis'))
if need_encoder
libvorbisenc_dep = dependency('vorbisenc', required: get_option('vorbisenc'))
else
libvorbisenc_dep = dependency('', required: false)
libvorbisenc_dep = dependency('', required: false)
if need_encoder and not get_option('vorbisenc').disabled()
if libvorbis_dep.found()
libvorbisenc_dep = dependency('vorbisenc', required: get_option('vorbisenc'))
elif get_option('vorbisenc').enabled()
error('Cannot build the Vorbis encoder without the Vorbis decoder')
else
message('Disabling the Vorbis encoder because the Vorbis decoder is disabled as well')
endif
endif
if libopus_dep.found() or libvorbis_dep.found() or libvorbisenc_dep.found()