Add SDL-mixer dependency

This commit is contained in:
PJB3005
2026-03-12 11:46:31 +01:00
parent 5235bb03fe
commit 4382f86c4f
2 changed files with 31 additions and 1 deletions
+3 -1
View File
@@ -62,7 +62,9 @@ FetchContent_Declare(
FetchContent_MakeAvailable(cxxopts)
message(STATUS "Dusk: Fetching SDL3-mixer")
include(cmake/SDL-mixer.cmake)
include(files.cmake)
# TODO: version handling for res includes
@@ -94,7 +96,7 @@ target_include_directories(game_debug PUBLIC
extern
${CMAKE_SOURCE_DIR}/build/${DUSK_TP_VERSION}/include
build/${DUSK_TP_VERSION}/include)
target_link_libraries(game_debug PUBLIC aurora::core aurora::gx aurora::gd aurora::si aurora::vi aurora::pad aurora::mtx aurora::os aurora::dvd aurora::card)
target_link_libraries(game_debug PUBLIC aurora::core aurora::gx aurora::gd aurora::si aurora::vi aurora::pad aurora::mtx aurora::os aurora::dvd aurora::card SDL3_mixer::SDL3_mixer)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
add_library(game SHARED ${DOLZEL_FILES} ${Z2AUDIOLIB_FILES} ${SSYSTEM_FILES} ${JSYSTEM_FILES} ${REL_FILES} ${DUSK_FILES} ${DOLPHIN_FILES}
+28
View File
@@ -0,0 +1,28 @@
set(SDLMIXER_VENDORED ON)
set(SDLMIXER_STRICT ON)
set(BUILD_SHARED_LIBS OFF)
set(SDLMIXER_AIFF OFF)
set(SDLMIXER_WAVE OFF)
set(SDLMIXER_VOC OFF)
set(SDLMIXER_AU OFF)
set(SDLMIXER_FLAC OFF)
set(SDLMIXER_GME OFF)
set(SDLMIXER_MOD OFF)
set(SDLMIXER_MP3 OFF)
set(SDLMIXER_MIDI OFF)
set(SDLMIXER_OPUS OFF)
set(SDLMIXER_WAVPACK OFF)
set(SDLMIXER_VORBIS_STB OFF)
set(SDLMIXER_VORBIS_VORBISFILE OFF)
FetchContent_Declare(SDL-mixer
URL https://github.com/libsdl-org/SDL_mixer/archive/refs/tags/release-3.2.0.tar.gz
URL_HASH SHA256=1077fef4a6e9513027da0a08e6f1b8645f8c88c8bef001c17befeb52b129b5dd
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
)
FetchContent_MakeAvailable(SDL-mixer)
if (NOT TARGET SDL3_mixer::SDL3_mixer)
message(FATAL_ERROR "Failed to make SDL-mixer available")
endif ()