SDL_mixer: cmake: make drflac and libflac mutually exclusive

From b2646d6f59c9b7d1a298844c34027991626ea547 Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Tue, 5 Sep 2023 02:42:00 +0200
Subject: [PATCH] cmake: make drflac and libflac mutually exclusive

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

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f6665ec8..7a647f24 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -111,11 +111,11 @@ option(SDL3MIXER_SNDFILE_SHARED "Dynamically load libsndfile" "${SDL3MIXER_DEPS_
 
 option(SDL3MIXER_FLAC "Enable FLAC music" ON)
 
-cmake_dependent_option(SDL3MIXER_FLAC_LIBFLAC "Enable FLAC music using libFLAC" ON SDL3MIXER_FLAC OFF)
-cmake_dependent_option(SDL3MIXER_FLAC_LIBFLAC_SHARED "Dynamically load LIBFLAC" "${SDL3MIXER_DEPS_SHARED}" SDL3MIXER_FLAC_LIBFLAC OFF)
-
 cmake_dependent_option(SDL3MIXER_FLAC_DRFLAC "Enable FLAC music using drflac" ON SDL3MIXER_FLAC OFF)
 
+cmake_dependent_option(SDL3MIXER_FLAC_LIBFLAC "Enable FLAC music using libFLAC" ON "SDL3MIXER_FLAC;NOT SDL3MIXER_FLAC_DRFLAC" OFF)
+cmake_dependent_option(SDL3MIXER_FLAC_LIBFLAC_SHARED "Dynamically load LIBFLAC" "${SDL3MIXER_DEPS_SHARED}" SDL3MIXER_FLAC_LIBFLAC OFF)
+
 option(SDL3MIXER_GME "Support loading GME music via game-music-emu" OFF)
 option(SDL3MIXER_GME_SHARED "Dynamically load libgme" "${SDL3MIXER_DEPS_SHARED}")