Initial CMake configuration
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 53aa77a..dfc3ea1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -250,7 +250,7 @@ if(APPLE OR ARCH_64 OR MSVC_CLANG)
set(OPT_DEF_SSEMATH ON)
endif()
endif()
-if(UNIX OR MINGW OR MSYS OR (USE_CLANG AND NOT WINDOWS) OR VITA OR PSP)
+if(UNIX OR MINGW OR MSYS OR (USE_CLANG AND NOT WINDOWS) OR VITA OR PSP OR PS2)
set(OPT_DEF_LIBC ON)
endif()
@@ -355,7 +355,7 @@ if(EMSCRIPTEN)
set(SDL_TEST_ENABLED_BY_DEFAULT OFF)
endif()
-if(VITA OR PSP)
+if(VITA OR PSP OR PS2)
set(SDL_SHARED_ENABLED_BY_DEFAULT OFF)
set(SDL_LOADSO_ENABLED_BY_DEFAULT OFF)
endif()
@@ -2521,6 +2521,9 @@ elseif(PSP)
GL
)
+elseif(PS2)
+ list(APPEND EXTRA_CFLAGS "-DPS2")
+
elseif(OS2)
list(APPEND EXTRA_CFLAGS "-DOS2EMX_PLAIN_CHAR")
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 62241fb..04ad3a1 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -259,7 +259,7 @@ endif()
file(GLOB RESOURCE_FILES *.bmp *.wav *.hex moose.dat utf8.txt)
file(COPY ${RESOURCE_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-if(PSP)
+if(PSP OR PS2)
set(NEEDS_RESOURCES
testscale
testrendercopyex
@@ -406,7 +406,7 @@ endif()
foreach(APP IN LISTS NEEDS_RESOURCES)
foreach(RESOURCE_FILE ${RESOURCE_FILES})
- if(PSP)
+ if(PSP OR PS2)
add_custom_command(TARGET ${APP} POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${RESOURCE_FILE} $<TARGET_FILE_DIR:${APP}>/sdl-${APP})
else()
add_custom_command(TARGET ${APP} POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${RESOURCE_FILE} $<TARGET_FILE_DIR:${APP}>)