lib/xiph/meson.build: define FLAC__NO_DLL for static libFLAC build (Windows)

In libFLAC 0.3.4 (commit c9530118a4), 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.
This commit is contained in:
Max Kellermann 2022-03-14 15:07:48 +01:00
parent c83294916a
commit 71cd6e6248
1 changed files with 7 additions and 0 deletions

View File

@ -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()