Allow emscripten platform to build without threads
This commit is contained in:
@@ -2711,10 +2711,14 @@ endif()
|
||||
|
||||
# We always need to have threads and timers around
|
||||
if(NOT HAVE_SDL_THREADS)
|
||||
message_error("Threads are needed by many SDL subsystems and may not be disabled")
|
||||
#set(SDL_THREADS_DISABLED 1)
|
||||
#file(GLOB THREADS_SOURCES ${SDL2_SOURCE_DIR}/src/thread/generic/*.c)
|
||||
#list(APPEND SOURCE_FILES ${THREADS_SOURCES})
|
||||
# The emscripten platform has been carefully vetted to work without threads
|
||||
if (EMSCRIPTEN)
|
||||
set(SDL_THREADS_DISABLED 1)
|
||||
file(GLOB THREADS_SOURCES ${SDL2_SOURCE_DIR}/src/thread/generic/*.c)
|
||||
list(APPEND SOURCE_FILES ${THREADS_SOURCES})
|
||||
else()
|
||||
message_error("Threads are needed by many SDL subsystems and may not be disabled")
|
||||
endif()
|
||||
endif()
|
||||
if(NOT HAVE_SDL_TIMERS)
|
||||
set(SDL_TIMER_DUMMY 1)
|
||||
|
||||
Reference in New Issue
Block a user