meson: fix flac_dep under Windows

declare_dependency's found() method evaluates to true always, resulting
in MPD trying to build flac when not found. Check for dependency()'s
find() first.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2023-12-27 12:43:08 -08:00
parent 8a3d144714
commit e7e07c39c5
1 changed files with 1 additions and 1 deletions

View File

@ -1,6 +1,6 @@
libflac_dep = dependency('flac', version: '>= 1.2', required: get_option('flac'))
if is_windows
if is_windows and libflac_dep.found()
# Our Windows build generates a static libFLAC build
libflac_dep = declare_dependency(compile_args: '-DFLAC__NO_DLL',
dependencies: libflac_dep)