From 30d97fe8a040a9d89f3be2dd443c1991cc73405f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 27 May 2020 16:05:39 +0200 Subject: [PATCH] meson.build: fix the WildMidi check when the feature is disabled Fixes regression from commit 69f09648a402 --- src/decoder/plugins/meson.build | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/decoder/plugins/meson.build b/src/decoder/plugins/meson.build index ca90cc07d..21a75c6a4 100644 --- a/src/decoder/plugins/meson.build +++ b/src/decoder/plugins/meson.build @@ -129,9 +129,13 @@ if wavpack_dep.found() decoder_plugins_sources += 'WavpackDecoderPlugin.cxx' endif -if not get_option('wildmidi').disabled() - wildmidi_dep = dependency('wildmidi', required: get_option('wildmidi')) +wildmidi_required = get_option('wildmidi') +if wildmidi_required.enabled() + # if the user has force-enabled WildMidi, allow the pkg-config test + # to fail; after that, the find_library() check must succeed + wildmidi_required = false endif +wildmidi_dep = dependency('wildmidi', required: wildmidi_required) if not wildmidi_dep.found() wildmidi_dep = c_compiler.find_library('WildMidi', required: get_option('wildmidi')) endif