emscripten: obey enable-misc/SDL_MISC settings

This commit is contained in:
pionere 2022-03-16 08:58:52 +01:00 committed by Ozkan Sezer
parent 123b9aaa41
commit 85dff3e453
3 changed files with 17 additions and 10 deletions

View File

@ -1175,10 +1175,11 @@ elseif(EMSCRIPTEN)
# project. Uncomment at will for verbose cross-compiling -I/../ path info. # project. Uncomment at will for verbose cross-compiling -I/../ path info.
target_compile_options(sdl-build-options INTERFACE "-Wno-warn-absolute-paths") target_compile_options(sdl-build-options INTERFACE "-Wno-warn-absolute-paths")
file(GLOB EMSRIPTEN_MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/emscripten/*.c) if(SDL_MISC)
set(SOURCE_FILES ${SOURCE_FILES} ${EMSRIPTEN_MISC_SOURCES}) file(GLOB EMSRIPTEN_MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/emscripten/*.c)
set(HAVE_SDL_MISC TRUE) set(SOURCE_FILES ${SOURCE_FILES} ${EMSRIPTEN_MISC_SOURCES})
set(HAVE_SDL_MISC TRUE)
endif()
if(SDL_AUDIO) if(SDL_AUDIO)
set(SDL_AUDIO_DRIVER_EMSCRIPTEN 1) set(SDL_AUDIO_DRIVER_EMSCRIPTEN 1)
file(GLOB EM_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/emscripten/*.c) file(GLOB EM_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/emscripten/*.c)

9
configure vendored
View File

@ -26683,8 +26683,11 @@ $as_echo "#define SDL_AUDIO_DRIVER_EMSCRIPTEN 1" >>confdefs.h
CheckClockGettime CheckClockGettime
CheckEmscriptenGLES CheckEmscriptenGLES
SOURCES="$SOURCES $srcdir/src/misc/emscripten/*.c" # Set up files for the misc library
have_misc=yes if test x$enable_misc = xyes; then
SOURCES="$SOURCES $srcdir/src/misc/emscripten/*.c"
have_misc=yes
fi
# Set up files for the power library # Set up files for the power library
if test x$enable_power = xyes; then if test x$enable_power = xyes; then
@ -26695,7 +26698,7 @@ $as_echo "#define SDL_POWER_EMSCRIPTEN 1" >>confdefs.h
have_power=yes have_power=yes
fi fi
# Set up files for the power library # Set up files for the joystick library
if test x$enable_joystick = xyes; then if test x$enable_joystick = xyes; then
$as_echo "#define SDL_JOYSTICK_EMSCRIPTEN 1" >>confdefs.h $as_echo "#define SDL_JOYSTICK_EMSCRIPTEN 1" >>confdefs.h

View File

@ -4388,8 +4388,11 @@ dnl BeOS support removed after SDL 2.0.1. Haiku still works. --ryan.
CheckClockGettime CheckClockGettime
CheckEmscriptenGLES CheckEmscriptenGLES
SOURCES="$SOURCES $srcdir/src/misc/emscripten/*.c" # Set up files for the misc library
have_misc=yes if test x$enable_misc = xyes; then
SOURCES="$SOURCES $srcdir/src/misc/emscripten/*.c"
have_misc=yes
fi
# Set up files for the power library # Set up files for the power library
if test x$enable_power = xyes; then if test x$enable_power = xyes; then
@ -4398,7 +4401,7 @@ dnl BeOS support removed after SDL 2.0.1. Haiku still works. --ryan.
have_power=yes have_power=yes
fi fi
# Set up files for the power library # Set up files for the joystick library
if test x$enable_joystick = xyes; then if test x$enable_joystick = xyes; then
AC_DEFINE(SDL_JOYSTICK_EMSCRIPTEN, 1, [ ]) AC_DEFINE(SDL_JOYSTICK_EMSCRIPTEN, 1, [ ])
SOURCES="$SOURCES $srcdir/src/joystick/emscripten/*.c" SOURCES="$SOURCES $srcdir/src/joystick/emscripten/*.c"