From 4e5d6e560bde09ee1fe0d28ad0d046a3b65669b5 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 27 May 2020 14:29:24 +0200 Subject: [PATCH] decoder/modplug: assume ModPlug is built as static library on Windows --- NEWS | 1 + src/decoder/plugins/ModplugDecoderPlugin.cxx | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 276c07b9d..30dd81a83 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,7 @@ ver 0.21.24 (not yet released) * database - simple: fix crash when mounting twice * decoder + - modplug: fix Windows build failure - wildmidi: attempt to detect WildMidi using pkg-config - wildmidi: fix Windows build failure * Android diff --git a/src/decoder/plugins/ModplugDecoderPlugin.cxx b/src/decoder/plugins/ModplugDecoderPlugin.cxx index d3d91efe1..2ba2de4e5 100644 --- a/src/decoder/plugins/ModplugDecoderPlugin.cxx +++ b/src/decoder/plugins/ModplugDecoderPlugin.cxx @@ -26,8 +26,13 @@ #include "util/RuntimeError.hxx" #include "Log.hxx" -#include +#ifdef _WIN32 +/* assume ModPlug is built as static library on Windows; without + this, linking to the static library would fail */ +#define MODPLUG_STATIC +#endif +#include #include