SDL_mixer: Add fluidsynth option to cmake build

From 4f49a777b35e0e025c18fed97c06ca4f09f93104 Mon Sep 17 00:00:00 2001
From: Emmanuel Jacyna <[EMAIL REDACTED]>
Date: Sun, 12 Jun 2022 08:57:27 +1000
Subject: [PATCH] Add fluidsynth option to cmake build

 CMakeLists.txt | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 886cec4b..cdfa2c8c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,6 +19,7 @@ option(SUPPORT_OGG "Support loading OGG Vorbis music via libvorbis" OFF)
 option(SUPPORT_OPUS "Support loading OGG Opus music via libopusfile" OFF)
 option(SUPPORT_MP3_MPG123 "Support loading MP3 music via MPG123" OFF)
 option(SUPPORT_MOD_MODPLUG "Support loading MOD music via modplug" OFF)
+option(SUPPORT_MID_FLUIDSYNTH "Support loading MIDI music via FluidSynth" OFF)
 option(SUPPORT_MID_TIMIDITY "Support loading MIDI music via TiMidity" ON)
 option(BUILD_SHARED_LIBS "Enable shared library" ON)
@@ -168,6 +169,11 @@ if (SUPPORT_MOD_MODPLUG)
     target_link_libraries(SDL2_mixer PRIVATE modplug)
+    target_compile_definitions(SDL2_mixer PRIVATE -DMUSIC_MID_FLUIDSYNTH)
+    target_link_libraries(SDL2_mixer PRIVATE fluidsynth)
     target_compile_definitions(SDL2_mixer PRIVATE -DMUSIC_MID_TIMIDITY)