SDL_mixer: cmake: fix vendored build with static SDL2_mixer using FLAC

From 5867728c7a2bbce7d90369e8d2617eacee426d7e Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Fri, 13 Oct 2023 14:05:02 +0200
Subject: [PATCH] cmake: fix vendored build with static SDL2_mixer using FLAC

---
 CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3f0761fd..a8fd6f53 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -554,7 +554,7 @@ if(SDL2MIXER_FLAC_LIBFLAC)
         message(STATUS "Using vendored libflac")
         sdl_check_project_in_subfolder(external/flac libflac SDL2MIXER_VENDORED)
         add_subdirectory(external/flac EXCLUDE_FROM_ALL)
-        if(SDL2MIXER_FLAC_LIBFLAC_SHARED)
+        if(SDL2MIXER_FLAC_LIBFLAC_SHARED OR NOT SDL2MIXER_BUILD_SHARED_LIBS)
             list(APPEND INSTALL_EXTRA_TARGETS FLAC)
         endif()
         if(NOT SDL2MIXER_FLAC_LIBFLAC_SHARED)