SDL_mixer: cmake: also disable dynamically loading external dependencies

From 8179d845fa27bc6889a08e2932a1529dbc34cd75 Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Fri, 12 Jan 2024 16:17:32 +0100
Subject: [PATCH] cmake: also disable dynamically loading external dependencies

---
 CMakeLists.txt | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index c48446b6..3321a62d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -77,17 +77,17 @@ include(CMakePackageConfigHelpers)
 include(GNUInstallDirs)
 include(PkgConfigHelper)
 
-set(BUILD_SHARED_LIBS_DEFAULT ON)
+set(PLATFORM_SUPPORTS_SHARED ON)
 if(VITA OR PSP OR PS2 OR N3DS OR RISCOS)
-  set(BUILD_SHARED_LIBS_DEFAULT OFF)
+  set(PLATFORM_SUPPORTS_SHARED OFF)
 endif()
 
 option(CMAKE_POSITION_INDEPENDENT_CODE "Build static libraries with -fPIC" ON)
-option(BUILD_SHARED_LIBS "Build the library as a shared library" ${BUILD_SHARED_LIBS_DEFAULT})
+cmake_dependent_option(BUILD_SHARED_LIBS "Build the library as a shared library" ON PLATFORM_SUPPORTS_SHARED OFF)
 
 cmake_dependent_option(SDL3MIXER_INSTALL "Enable SDL3mixer install target" ${SDL3MIXER_ROOTPROJECT} "${sdl3mixer_install_enableable}" OFF)
 cmake_dependent_option(SDL3MIXER_INSTALL_MAN "Install man pages for SDL3_mixer" ${SDL3MIXER_ROOTPROJECT} "SDL3MIXER_INSTALL" OFF)
-option(SDL3MIXER_DEPS_SHARED "Default value for loading dependencies dynamically" ON)
+cmake_dependent_option(SDL3MIXER_DEPS_SHARED "Load dependencies dynamically" ON PLATFORM_SUPPORTS_SHARED OFF)
 option(SDL3MIXER_VENDORED "Use vendored third-party libraries" ${vendored_default})
 option(SDL3MIXER_WERROR "Treat warnings as errors" OFF)