mirror of https://github.com/encounter/SDL.git
Fixed bug 3774 - Cmake build fails for Android
sfalexrog Android haptic code was not added to CMakeLists.txt, leading to build failures when targeting Android platform. Attached patch adds Android haptic driver to source sets and adds configuration parameter to SDL_config.h.cmake.
This commit is contained in:
parent
bbd9acdddb
commit
5ca0152218
|
@ -801,6 +801,12 @@ if(ANDROID)
|
||||||
set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_FILESYSTEM_SOURCES})
|
set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_FILESYSTEM_SOURCES})
|
||||||
set(HAVE_SDL_FILESYSTEM TRUE)
|
set(HAVE_SDL_FILESYSTEM TRUE)
|
||||||
endif()
|
endif()
|
||||||
|
if(SDL_HAPTIC)
|
||||||
|
set(SDL_HAPTIC_ANDROID 1)
|
||||||
|
file(GLOB ANDROID_HAPTIC_SOURCES ${SDL2_SOURCE_DIR}/src/haptic/android/*.c)
|
||||||
|
set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_HAPTIC_SOURCES})
|
||||||
|
set(HAVE_SDL_HAPTIC TRUE)
|
||||||
|
endif()
|
||||||
if(SDL_JOYSTICK)
|
if(SDL_JOYSTICK)
|
||||||
set(SDL_JOYSTICK_ANDROID 1)
|
set(SDL_JOYSTICK_ANDROID 1)
|
||||||
file(GLOB ANDROID_JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/android/*.c)
|
file(GLOB ANDROID_JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/android/*.c)
|
||||||
|
|
|
@ -265,6 +265,7 @@
|
||||||
#cmakedefine SDL_HAPTIC_IOKIT @SDL_HAPTIC_IOKIT@
|
#cmakedefine SDL_HAPTIC_IOKIT @SDL_HAPTIC_IOKIT@
|
||||||
#cmakedefine SDL_HAPTIC_DINPUT @SDL_HAPTIC_DINPUT@
|
#cmakedefine SDL_HAPTIC_DINPUT @SDL_HAPTIC_DINPUT@
|
||||||
#cmakedefine SDL_HAPTIC_XINPUT @SDL_HAPTIC_XINPUT@
|
#cmakedefine SDL_HAPTIC_XINPUT @SDL_HAPTIC_XINPUT@
|
||||||
|
#cmakedefine SDL_HAPTIC_ANDROID @SDL_HAPTIC_ANDROID@
|
||||||
|
|
||||||
/* Enable various shared object loading systems */
|
/* Enable various shared object loading systems */
|
||||||
#cmakedefine SDL_LOADSO_DLOPEN @SDL_LOADSO_DLOPEN@
|
#cmakedefine SDL_LOADSO_DLOPEN @SDL_LOADSO_DLOPEN@
|
||||||
|
|
Loading…
Reference in New Issue