From 5990e46de261b34ab3d8bbf63492aa138d350a72 Mon Sep 17 00:00:00 2001 From: Max Kellermann <max@musicpd.org> Date: Thu, 2 Jan 2020 13:01:38 +0100 Subject: [PATCH] lib/xiph/meson.build: exclude VorbisComments.cxx if the Vorbis decoder is disabled Fixes a build failure. --- src/lib/xiph/meson.build | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/lib/xiph/meson.build b/src/lib/xiph/meson.build index ae4267a24..d57d68d8f 100644 --- a/src/lib/xiph/meson.build +++ b/src/lib/xiph/meson.build @@ -45,12 +45,19 @@ if not libogg_dep.found() and not libflac_dep.found() subdir_done() endif -xiph = static_library( - 'xiph', +xiph_sources = [ 'ScanVorbisComment.cxx', - 'VorbisComments.cxx', 'VorbisPicture.cxx', 'XiphTags.cxx', +] + +if libvorbis_dep.found() or libvorbisidec_dep.found() + xiph_sources += 'VorbisComments.cxx' +endif + +xiph = static_library( + 'xiph', + xiph_sources, include_directories: inc, dependencies: [ libvorbis_dep,