Updated CMakeLists.txt now that timers and threads can't be disabled

main
Sam Lantinga 2024-01-17 08:36:52 -08:00
parent e2080f74fd
commit ac367be171
2 changed files with 123 additions and 124 deletions

View File

@ -204,10 +204,6 @@ if(EMSCRIPTEN)
# Set up default values for the currently supported set of subsystems: # Set up default values for the currently supported set of subsystems:
# Emscripten/Javascript does not have assembly support, a dynamic library # Emscripten/Javascript does not have assembly support, a dynamic library
# loading architecture, or low-level CPU inspection. # loading architecture, or low-level CPU inspection.
# SDL_THREADS_DEFAULT now defaults to ON, but pthread support might be disabled by default.
# !!! FIXME: most of these subsystems should default to ON if there are dummy implementations to be used.
set(SDL_ASSEMBLY_DEFAULT OFF) set(SDL_ASSEMBLY_DEFAULT OFF)
set(SDL_SHARED_AVAILABLE OFF) set(SDL_SHARED_AVAILABLE OFF)
endif() endif()
@ -244,8 +240,6 @@ set(SDL_SUBSYSTEMS
Haptic Haptic
Hidapi Hidapi
Power Power
Threads
Timers
File File
Filesystem Filesystem
Sensor Sensor
@ -1253,19 +1247,23 @@ if(ANDROID)
set(HAVE_SDL_AUDIO TRUE) set(HAVE_SDL_AUDIO TRUE)
endif() endif()
if(SDL_FILESYSTEM) if(SDL_FILESYSTEM)
set(SDL_FILESYSTEM_ANDROID 1) set(SDL_FILESYSTEM_ANDROID 1)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/filesystem/android/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/filesystem/android/*.c")
set(HAVE_SDL_FILESYSTEM TRUE) set(HAVE_SDL_FILESYSTEM TRUE)
endif() endif()
if(SDL_HAPTIC) if(SDL_HAPTIC)
set(SDL_HAPTIC_ANDROID 1) set(SDL_HAPTIC_ANDROID 1)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/haptic/android/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/haptic/android/*.c")
set(HAVE_SDL_HAPTIC TRUE) set(HAVE_SDL_HAPTIC TRUE)
endif() endif()
if(SDL_HIDAPI) if(SDL_HIDAPI)
CheckHIDAPI() CheckHIDAPI()
endif() endif()
if(SDL_JOYSTICK) if(SDL_JOYSTICK)
set(SDL_JOYSTICK_ANDROID 1) set(SDL_JOYSTICK_ANDROID 1)
sdl_glob_sources( sdl_glob_sources(
@ -1274,28 +1272,32 @@ if(ANDROID)
) )
set(HAVE_SDL_JOYSTICK TRUE) set(HAVE_SDL_JOYSTICK TRUE)
endif() endif()
set(SDL_LOADSO_DLOPEN 1) set(SDL_LOADSO_DLOPEN 1)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/loadso/dlopen/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/loadso/dlopen/*.c")
set(HAVE_SDL_LOADSO TRUE) set(HAVE_SDL_LOADSO TRUE)
if(SDL_POWER) if(SDL_POWER)
set(SDL_POWER_ANDROID 1) set(SDL_POWER_ANDROID 1)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/power/android/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/power/android/*.c")
set(HAVE_SDL_POWER TRUE) set(HAVE_SDL_POWER TRUE)
endif() endif()
if(SDL_LOCALE) if(SDL_LOCALE)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/locale/android/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/locale/android/*.c")
set(HAVE_SDL_LOCALE TRUE) set(HAVE_SDL_LOCALE TRUE)
endif() endif()
if(SDL_TIMERS)
set(SDL_TIMER_UNIX 1) set(SDL_TIMER_UNIX 1)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/timer/unix/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/timer/unix/*.c")
set(HAVE_SDL_TIMERS TRUE) set(HAVE_SDL_TIMERS TRUE)
endif()
if(SDL_SENSOR) if(SDL_SENSOR)
set(SDL_SENSOR_ANDROID 1) set(SDL_SENSOR_ANDROID 1)
set(HAVE_SDL_SENSORS TRUE) set(HAVE_SDL_SENSORS TRUE)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/sensor/android/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/sensor/android/*.c")
endif() endif()
if(SDL_VIDEO) if(SDL_VIDEO)
set(SDL_VIDEO_DRIVER_ANDROID 1) set(SDL_VIDEO_DRIVER_ANDROID 1)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/video/android/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/video/android/*.c")
@ -1397,31 +1399,36 @@ elseif(EMSCRIPTEN)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/misc/emscripten/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/misc/emscripten/*.c")
set(HAVE_SDL_MISC TRUE) set(HAVE_SDL_MISC TRUE)
endif() endif()
if(SDL_AUDIO) if(SDL_AUDIO)
set(SDL_AUDIO_DRIVER_EMSCRIPTEN 1) set(SDL_AUDIO_DRIVER_EMSCRIPTEN 1)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/audio/emscripten/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/audio/emscripten/*.c")
set(HAVE_SDL_AUDIO TRUE) set(HAVE_SDL_AUDIO TRUE)
endif() endif()
if(SDL_FILESYSTEM) if(SDL_FILESYSTEM)
set(SDL_FILESYSTEM_EMSCRIPTEN 1) set(SDL_FILESYSTEM_EMSCRIPTEN 1)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/filesystem/emscripten/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/filesystem/emscripten/*.c")
set(HAVE_SDL_FILESYSTEM TRUE) set(HAVE_SDL_FILESYSTEM TRUE)
endif() endif()
if(SDL_JOYSTICK) if(SDL_JOYSTICK)
set(SDL_JOYSTICK_EMSCRIPTEN 1) set(SDL_JOYSTICK_EMSCRIPTEN 1)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/joystick/emscripten/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/joystick/emscripten/*.c")
set(HAVE_SDL_JOYSTICK TRUE) set(HAVE_SDL_JOYSTICK TRUE)
endif() endif()
if(SDL_POWER) if(SDL_POWER)
set(SDL_POWER_EMSCRIPTEN 1) set(SDL_POWER_EMSCRIPTEN 1)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/power/emscripten/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/power/emscripten/*.c")
set(HAVE_SDL_POWER TRUE) set(HAVE_SDL_POWER TRUE)
endif() endif()
if(SDL_LOCALE) if(SDL_LOCALE)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/locale/emscripten/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/locale/emscripten/*.c")
set(HAVE_SDL_LOCALE TRUE) set(HAVE_SDL_LOCALE TRUE)
endif() endif()
if(SDL_TIMERS)
set(SDL_TIMER_UNIX 1) set(SDL_TIMER_UNIX 1)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/timer/unix/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/timer/unix/*.c")
set(HAVE_SDL_TIMERS TRUE) set(HAVE_SDL_TIMERS TRUE)
@ -1429,7 +1436,7 @@ elseif(EMSCRIPTEN)
if(SDL_CLOCK_GETTIME) if(SDL_CLOCK_GETTIME)
set(HAVE_CLOCK_GETTIME 1) set(HAVE_CLOCK_GETTIME 1)
endif() endif()
endif()
if(SDL_VIDEO) if(SDL_VIDEO)
set(SDL_VIDEO_DRIVER_EMSCRIPTEN 1) set(SDL_VIDEO_DRIVER_EMSCRIPTEN 1)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/video/emscripten/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/video/emscripten/*.c")
@ -1706,11 +1713,9 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
set(HAVE_SDL_FILESYSTEM TRUE) set(HAVE_SDL_FILESYSTEM TRUE)
endif() endif()
if(SDL_TIMERS)
set(SDL_TIMER_UNIX 1) set(SDL_TIMER_UNIX 1)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/timer/unix/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/timer/unix/*.c")
set(HAVE_SDL_TIMERS TRUE) set(HAVE_SDL_TIMERS TRUE)
endif()
set(SDL_RLD_FLAGS "") set(SDL_RLD_FLAGS "")
if(SDL_RPATH AND SDL_SHARED) if(SDL_RPATH AND SDL_SHARED)
@ -1880,7 +1885,6 @@ elseif(WINDOWS)
set(HAVE_SDL_VIDEO TRUE) set(HAVE_SDL_VIDEO TRUE)
endif() endif()
if(SDL_THREADS)
set(SDL_THREAD_GENERIC_COND_SUFFIX 1) set(SDL_THREAD_GENERIC_COND_SUFFIX 1)
set(SDL_THREAD_GENERIC_RWLOCK_SUFFIX 1) set(SDL_THREAD_GENERIC_RWLOCK_SUFFIX 1)
set(SDL_THREAD_WINDOWS 1) set(SDL_THREAD_WINDOWS 1)
@ -1895,7 +1899,6 @@ elseif(WINDOWS)
"${SDL3_SOURCE_DIR}/src/thread/windows/SDL_systls.c" "${SDL3_SOURCE_DIR}/src/thread/windows/SDL_systls.c"
) )
set(HAVE_SDL_THREADS TRUE) set(HAVE_SDL_THREADS TRUE)
endif()
if(SDL_SENSOR AND HAVE_SENSORSAPI_H AND NOT WINDOWS_STORE) if(SDL_SENSOR AND HAVE_SENSORSAPI_H AND NOT WINDOWS_STORE)
set(SDL_SENSOR_WINDOWS 1) set(SDL_SENSOR_WINDOWS 1)
@ -1949,11 +1952,9 @@ elseif(WINDOWS)
) )
endif() endif()
if(SDL_TIMERS)
set(SDL_TIMER_WINDOWS 1) set(SDL_TIMER_WINDOWS 1)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/timer/windows/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/timer/windows/*.c")
set(HAVE_SDL_TIMERS TRUE) set(HAVE_SDL_TIMERS TRUE)
endif()
set(SDL_LOADSO_WINDOWS 1) set(SDL_LOADSO_WINDOWS 1)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/loadso/windows/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/loadso/windows/*.c")
@ -2159,11 +2160,9 @@ elseif(APPLE)
set(HAVE_SDL_LOCALE TRUE) set(HAVE_SDL_LOCALE TRUE)
endif() endif()
if(SDL_TIMERS)
set(SDL_TIMER_UNIX 1) set(SDL_TIMER_UNIX 1)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/timer/unix/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/timer/unix/*.c")
set(HAVE_SDL_TIMERS TRUE) set(HAVE_SDL_TIMERS TRUE)
endif()
if(SDL_FILESYSTEM) if(SDL_FILESYSTEM)
set(SDL_FILESYSTEM_COCOA 1) set(SDL_FILESYSTEM_COCOA 1)
@ -2357,11 +2356,9 @@ elseif(HAIKU)
set(HAVE_SDL_FILESYSTEM TRUE) set(HAVE_SDL_FILESYSTEM TRUE)
endif() endif()
if(SDL_TIMERS)
set(SDL_TIMER_HAIKU 1) set(SDL_TIMER_HAIKU 1)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/timer/haiku/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/timer/haiku/*.c")
set(HAVE_SDL_TIMERS TRUE) set(HAVE_SDL_TIMERS TRUE)
endif()
if(SDL_POWER) if(SDL_POWER)
set(SDL_POWER_HAIKU 1) set(SDL_POWER_HAIKU 1)
@ -2397,7 +2394,6 @@ elseif(RISCOS)
set(HAVE_SDL_FILESYSTEM TRUE) set(HAVE_SDL_FILESYSTEM TRUE)
endif() endif()
if(SDL_TIMERS)
set(SDL_TIMER_UNIX 1) set(SDL_TIMER_UNIX 1)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/timer/unix/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/timer/unix/*.c")
set(HAVE_SDL_TIMERS TRUE) set(HAVE_SDL_TIMERS TRUE)
@ -2405,7 +2401,6 @@ elseif(RISCOS)
if(SDL_CLOCK_GETTIME) if(SDL_CLOCK_GETTIME)
set(HAVE_CLOCK_GETTIME 1) set(HAVE_CLOCK_GETTIME 1)
endif() endif()
endif()
CheckPTHREAD() CheckPTHREAD()
@ -2433,22 +2428,25 @@ elseif(VITA)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/audio/vita/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/audio/vita/*.c")
set(HAVE_SDL_AUDIO TRUE) set(HAVE_SDL_AUDIO TRUE)
endif() endif()
if(SDL_FILESYSTEM) if(SDL_FILESYSTEM)
set(SDL_FILESYSTEM_VITA 1) set(SDL_FILESYSTEM_VITA 1)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/filesystem/vita/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/filesystem/vita/*.c")
set(HAVE_SDL_FILESYSTEM TRUE) set(HAVE_SDL_FILESYSTEM TRUE)
endif() endif()
if(SDL_JOYSTICK) if(SDL_JOYSTICK)
set(SDL_JOYSTICK_VITA 1) set(SDL_JOYSTICK_VITA 1)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/joystick/vita/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/joystick/vita/*.c")
set(HAVE_SDL_JOYSTICK TRUE) set(HAVE_SDL_JOYSTICK TRUE)
endif() endif()
if(SDL_POWER) if(SDL_POWER)
set(SDL_POWER_VITA 1) set(SDL_POWER_VITA 1)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/power/vita/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/power/vita/*.c")
set(HAVE_SDL_POWER TRUE) set(HAVE_SDL_POWER TRUE)
endif() endif()
if(SDL_THREADS)
set(SDL_THREAD_VITA 1) set(SDL_THREAD_VITA 1)
sdl_sources( sdl_sources(
"${SDL3_SOURCE_DIR}/src/thread/vita/SDL_sysmutex.c" "${SDL3_SOURCE_DIR}/src/thread/vita/SDL_sysmutex.c"
@ -2459,21 +2457,22 @@ elseif(VITA)
"${SDL3_SOURCE_DIR}/src/thread/generic/SDL_systls.c" "${SDL3_SOURCE_DIR}/src/thread/generic/SDL_systls.c"
) )
set(HAVE_SDL_THREADS TRUE) set(HAVE_SDL_THREADS TRUE)
endif()
if(SDL_LOCALE) if(SDL_LOCALE)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/locale/vita/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/locale/vita/*.c")
set(HAVE_SDL_LOCALE TRUE) set(HAVE_SDL_LOCALE TRUE)
endif() endif()
if(SDL_TIMERS)
set(SDL_TIMER_VITA 1) set(SDL_TIMER_VITA 1)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/timer/vita/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/timer/vita/*.c")
set(HAVE_SDL_TIMERS TRUE) set(HAVE_SDL_TIMERS TRUE)
endif()
if(SDL_SENSOR) if(SDL_SENSOR)
set(SDL_SENSOR_VITA 1) set(SDL_SENSOR_VITA 1)
set(HAVE_SDL_SENSORS TRUE) set(HAVE_SDL_SENSORS TRUE)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/sensor/vita/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/sensor/vita/*.c")
endif() endif()
if(SDL_VIDEO) if(SDL_VIDEO)
set(SDL_VIDEO_DRIVER_VITA 1) set(SDL_VIDEO_DRIVER_VITA 1)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/video/vita/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/video/vita/*.c")
@ -2567,22 +2566,25 @@ elseif(PSP)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/audio/psp/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/audio/psp/*.c")
set(HAVE_SDL_AUDIO TRUE) set(HAVE_SDL_AUDIO TRUE)
endif() endif()
if(SDL_FILESYSTEM) if(SDL_FILESYSTEM)
set(SDL_FILESYSTEM_PSP 1) set(SDL_FILESYSTEM_PSP 1)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/filesystem/psp/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/filesystem/psp/*.c")
set(HAVE_SDL_FILESYSTEM TRUE) set(HAVE_SDL_FILESYSTEM TRUE)
endif() endif()
if(SDL_JOYSTICK) if(SDL_JOYSTICK)
set(SDL_JOYSTICK_PSP 1) set(SDL_JOYSTICK_PSP 1)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/joystick/psp/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/joystick/psp/*.c")
set(HAVE_SDL_JOYSTICK TRUE) set(HAVE_SDL_JOYSTICK TRUE)
endif() endif()
if(SDL_POWER) if(SDL_POWER)
set(SDL_POWER_PSP 1) set(SDL_POWER_PSP 1)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/power/psp/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/power/psp/*.c")
set(HAVE_SDL_POWER TRUE) set(HAVE_SDL_POWER TRUE)
endif() endif()
if(SDL_THREADS)
set(SDL_THREAD_PSP 1) set(SDL_THREAD_PSP 1)
sdl_glob_sources( sdl_glob_sources(
"${SDL3_SOURCE_DIR}/src/thread/generic/SDL_syscond.c" "${SDL3_SOURCE_DIR}/src/thread/generic/SDL_syscond.c"
@ -2591,12 +2593,11 @@ elseif(PSP)
"${SDL3_SOURCE_DIR}/src/thread/psp/*.c" "${SDL3_SOURCE_DIR}/src/thread/psp/*.c"
) )
set(HAVE_SDL_THREADS TRUE) set(HAVE_SDL_THREADS TRUE)
endif()
if(SDL_TIMERS)
set(SDL_TIMER_PSP 1) set(SDL_TIMER_PSP 1)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/timer/psp/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/timer/psp/*.c")
set(HAVE_SDL_TIMERS TRUE) set(HAVE_SDL_TIMERS TRUE)
endif()
if(SDL_VIDEO) if(SDL_VIDEO)
set(SDL_VIDEO_DRIVER_PSP 1) set(SDL_VIDEO_DRIVER_PSP 1)
set(SDL_VIDEO_RENDER_PSP 1) set(SDL_VIDEO_RENDER_PSP 1)
@ -2604,6 +2605,7 @@ elseif(PSP)
set(SDL_VIDEO_OPENGL 1) set(SDL_VIDEO_OPENGL 1)
set(HAVE_SDL_VIDEO TRUE) set(HAVE_SDL_VIDEO TRUE)
endif() endif()
sdl_link_dependency(base sdl_link_dependency(base
LIBS LIBS
GL GL
@ -2629,17 +2631,19 @@ elseif(PS2)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/audio/ps2/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/audio/ps2/*.c")
set(HAVE_SDL_AUDIO TRUE) set(HAVE_SDL_AUDIO TRUE)
endif() endif()
if(SDL_FILESYSTEM) if(SDL_FILESYSTEM)
set(SDL_FILESYSTEM_PS2 1) set(SDL_FILESYSTEM_PS2 1)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/filesystem/ps2/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/filesystem/ps2/*.c")
set(HAVE_SDL_FILESYSTEM TRUE) set(HAVE_SDL_FILESYSTEM TRUE)
endif() endif()
if(SDL_JOYSTICK) if(SDL_JOYSTICK)
set(SDL_JOYSTICK_PS2 1) set(SDL_JOYSTICK_PS2 1)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/joystick/ps2/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/joystick/ps2/*.c")
set(HAVE_SDL_JOYSTICK TRUE) set(HAVE_SDL_JOYSTICK TRUE)
endif() endif()
if(SDL_THREADS)
set(SDL_THREAD_PS2 1) set(SDL_THREAD_PS2 1)
sdl_glob_sources( sdl_glob_sources(
"${SDL3_SOURCE_DIR}/src/thread/generic/SDL_syscond.c" "${SDL3_SOURCE_DIR}/src/thread/generic/SDL_syscond.c"
@ -2649,12 +2653,11 @@ elseif(PS2)
"${SDL3_SOURCE_DIR}/src/thread/ps2/*.c" "${SDL3_SOURCE_DIR}/src/thread/ps2/*.c"
) )
set(HAVE_SDL_THREADS TRUE) set(HAVE_SDL_THREADS TRUE)
endif()
if(SDL_TIMERS)
set(SDL_TIMER_PS2 1) set(SDL_TIMER_PS2 1)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/timer/ps2/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/timer/ps2/*.c")
set(HAVE_SDL_TIMERS TRUE) set(HAVE_SDL_TIMERS TRUE)
endif()
if(SDL_VIDEO) if(SDL_VIDEO)
set(SDL_VIDEO_DRIVER_PS2 1) set(SDL_VIDEO_DRIVER_PS2 1)
set(SDL_VIDEO_RENDER_PS2 1) set(SDL_VIDEO_RENDER_PS2 1)
@ -2700,7 +2703,6 @@ elseif(N3DS)
set(HAVE_SDL_POWER TRUE) set(HAVE_SDL_POWER TRUE)
endif() endif()
if(SDL_THREADS)
set(SDL_THREAD_N3DS 1) set(SDL_THREAD_N3DS 1)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/thread/n3ds/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/thread/n3ds/*.c")
sdl_sources( sdl_sources(
@ -2708,13 +2710,10 @@ elseif(N3DS)
"${SDL3_SOURCE_DIR}/src/thread/generic/SDL_sysrwlock.c" "${SDL3_SOURCE_DIR}/src/thread/generic/SDL_sysrwlock.c"
) )
set(HAVE_SDL_THREADS TRUE) set(HAVE_SDL_THREADS TRUE)
endif()
if(SDL_TIMERS)
set(SDL_TIMER_N3DS 1) set(SDL_TIMER_N3DS 1)
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/timer/n3ds/*.c") sdl_glob_sources("${SDL3_SOURCE_DIR}/src/timer/n3ds/*.c")
set(HAVE_SDL_TIMERS TRUE) set(HAVE_SDL_TIMERS TRUE)
endif()
if(SDL_SENSOR) if(SDL_SENSOR)
set(SDL_SENSOR_N3DS 1) set(SDL_SENSOR_N3DS 1)

View File

@ -737,7 +737,7 @@ endmacro()
# PTHREAD_LIBS # PTHREAD_LIBS
macro(CheckPTHREAD) macro(CheckPTHREAD)
cmake_push_check_state() cmake_push_check_state()
if(SDL_THREADS AND SDL_PTHREADS) if(SDL_PTHREADS)
if(ANDROID) if(ANDROID)
# the android libc provides built-in support for pthreads, so no # the android libc provides built-in support for pthreads, so no
# additional linking or compile flags are necessary # additional linking or compile flags are necessary