From dfa6768a96e644617468547cecf60d466e59627e Mon Sep 17 00:00:00 2001 From: Benedikt Galbavy Date: Sun, 28 Jan 2024 19:10:19 +0100 Subject: [PATCH] added SDL_mixer --- .gitmodules | 4 ++++ CMakeLists.txt | 4 ++++ extern/SDL_mixer | 1 + include/Game.h | 1 + 4 files changed, 10 insertions(+) create mode 160000 extern/SDL_mixer diff --git a/.gitmodules b/.gitmodules index e1f447a..3b3e0da 100644 --- a/.gitmodules +++ b/.gitmodules @@ -14,3 +14,7 @@ path = extern/zlib url = https://github.com/madler/zlib.git branch = master +[submodule "extern/SDL_mixer"] + path = extern/SDL_mixer + url = https://github.com/libsdl-org/SDL_mixer.git + branch = release-2.8.x diff --git a/CMakeLists.txt b/CMakeLists.txt index 7e5c48a..4ed07f3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,8 +12,11 @@ set(PROJECT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) set(BUILD_SHARED_LIBS FALSE) +set(SDL2MIXER_VENDORED ON) + add_subdirectory(extern/SDL EXCLUDE_FROM_ALL) add_subdirectory(extern/SDL_image EXCLUDE_FROM_ALL) +add_subdirectory(extern/SDL_mixer EXCLUDE_FROM_ALL) file(GLOB_RECURSE SOURCES ${PROJECT_SOURCE_DIR}/src/*.cpp) add_executable(${PROJECT_NAME} ${SOURCES}) @@ -24,6 +27,7 @@ target_link_libraries(${PROJECT_NAME} PRIVATE SDL2::SDL2main SDL2::SDL2-static SDL2_image::SDL2_image-static + SDL2_mixer::SDL2_mixer-static ) file(COPY ${PROJECT_SOURCE_DIR}/assets DESTINATION ${PROJECT_BINARY_DIR}) \ No newline at end of file diff --git a/extern/SDL_mixer b/extern/SDL_mixer new file mode 160000 index 0000000..5bcd40a --- /dev/null +++ b/extern/SDL_mixer @@ -0,0 +1 @@ +Subproject commit 5bcd40ad962dc72a3c051084ce128d78f7656566 diff --git a/include/Game.h b/include/Game.h index 117bb29..9ba7ac6 100644 --- a/include/Game.h +++ b/include/Game.h @@ -2,6 +2,7 @@ #include #include +#include #include #include "Vector2D.h"