summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fcf91b3)
raw | patch | inline | side by side (parent: fcf91b3)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Wed, 1 Apr 2020 15:36:20 +0000 (18:36 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Wed, 1 Apr 2020 15:36:20 +0000 (18:36 +0300) |
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index f3d8ed042eef4a092488c30801ce849511a83a5b..e496d8cf2f59118da7f79497d79473752d4e71e4 100644 (file)
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
set(D2D_OPENAL_ROOT ${D2D_GAME_ROOT}/openal)
set(D2D_STUBSOUND_ROOT ${D2D_GAME_ROOT}/stubsnd)
+string(COMPARE EQUAL "${CMAKE_SYSTEM_NAME}" "Darwin" D2D_FOR_DARWIN)
+string(COMPARE EQUAL "${CMAKE_SYSTEM_PROCESSOR}" "powerpc" D2D_FOR_POWERPC)
+
aux_source_directory(${D2D_GAME_ROOT} D2D_GAME_SRC)
aux_source_directory(${D2D_SDL_ROOT} D2D_SDL_SRC)
aux_source_directory(${D2D_SDL2_ROOT} D2D_SDL2_SRC)
set(D2D_SYSTEM_INCLUDE_DIR "${SDL_INCLUDE_DIR}")
set(D2D_SYSTEM_LIBRARY "${SDL_LIBRARY}")
elseif(WITH_SDL2)
-# find_package(SDL2 REQUIRED)
- set(SDL2_INCLUDE_DIR "/usr/local/include/SDL2")
- set(SDL2_LIBRARY "-lSDL2")
+ if(D2D_FOR_DARWIN AND D2D_FOR_POWERPC)
+ # tigerbrew did not provide sdl2 module for cmake
+ find_package(SDL2)
+ if(NOT SDL2_FOUND)
+ set(SDL2_INCLUDE_DIRS "/usr/local/include/SDL2")
+ set(SDL2_LIBRARIES "-lSDL2")
+ endif(NOT SDL2_FOUND)
+ else(D2D_FOR_DARWIN AND D2D_FOR_POWERPC)
+ find_package(SDL2 REQUIRED)
+ endif(D2D_FOR_DARWIN AND D2D_FOR_POWERPC)
set(D2D_SYSTEM_SRC "${D2D_SDL2_SRC}")
- set(D2D_SYSTEM_INCLUDE_DIR "${SDL2_INCLUDE_DIR}")
- set(D2D_SYSTEM_LIBRARY "${SDL2_LIBRARY}")
+ set(D2D_SYSTEM_INCLUDE_DIR "${SDL2_INCLUDE_DIRS}")
+ set(D2D_SYSTEM_LIBRARY "${SDL2_LIBRARIES}")
else(WITH_SDL)
message(FATAL_ERROR "Select SYSTEM_DRIVER as 'SDL' or 'SDL2'")
endif(WITH_SDL)
diff --git a/src/openal/sound.c b/src/openal/sound.c
index fc1e60ab43b37acfeccea68b4c86a26eef80e3a4..73d36a42968a46e87f3548c900257a0dd84635a8 100644 (file)
--- a/src/openal/sound.c
+++ b/src/openal/sound.c
# include <AL/alc.h>
#endif
-#include <SDL.h> // SDL_BuildAudioCVT SDL_ConvertAudio
+#include "SDL.h" // SDL_BuildAudioCVT SDL_ConvertAudio
#include <assert.h>
#include <stdlib.h> // malloc
#include <string.h> // memcpy
diff --git a/src/sdl/main.c b/src/sdl/main.c
index df880c432e3a2b9cf8e447faf0adfd02e6872082..0b1aada10b2c8886093651c5401a8fbab2eca3e9 100644 (file)
--- a/src/sdl/main.c
+++ b/src/sdl/main.c
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <SDL.h>
+#include "SDL.h"
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h> // srand exit
diff --git a/src/sdl2/main.c b/src/sdl2/main.c
index 81ecaa173cb0574bae6f6808724a8f2e322db8d2..fc50b90823a2899c36767640429e7cd64334f0c1 100644 (file)
--- a/src/sdl2/main.c
+++ b/src/sdl2/main.c
-#include <SDL.h>
+#include "SDL.h"
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h> // srand exit
diff --git a/src/sdlmixer/sound.c b/src/sdlmixer/sound.c
index 93c1b6350f3cd9ae3935a1c4dde5071fcf2391e8..8867e57057cfd62460e526c27a2132949e610549 100644 (file)
--- a/src/sdlmixer/sound.c
+++ b/src/sdlmixer/sound.c
#include "files.h" // F_findres
#include "error.h"
-#include <SDL.h>
-#include <SDL_mixer.h>
+#include "SDL.h"
+#include "SDL_mixer.h"
#include <assert.h>
#define TAG_MIX1 0x4d495831