From 71cd6e624824782baee257eaa0c95a922d153857 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 14 Mar 2022 15:07:48 +0100 Subject: [PATCH] lib/xiph/meson.build: define FLAC__NO_DLL for static libFLAC build (Windows) In libFLAC 0.3.4 (commit c9530118a44), the "dllimport" check has been changed from "_MSC_VER" to "_WIN32", and now the MPD build is affected by it. Defining FLAC__NO_DLL disables the use of "dllimport", which allows linking properly to the static libFLAC build. --- src/lib/xiph/meson.build | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/lib/xiph/meson.build b/src/lib/xiph/meson.build index 8786ac7e6..c39cee8d4 100644 --- a/src/lib/xiph/meson.build +++ b/src/lib/xiph/meson.build @@ -1,4 +1,11 @@ libflac_dep = dependency('flac', version: '>= 1.2', required: get_option('flac')) + +if is_windows + # Our Windows build generates a static libFLAC build + libflac_dep = declare_dependency(compile_args: '-DFLAC__NO_DLL', + dependencies: libflac_dep) +endif + libopus_dep = dependency('opus', required: get_option('opus')) if get_option('tremor').enabled()