diff --git a/CMakeLists.txt b/CMakeLists.txt index faabcaa4d..ad86399ed 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -801,6 +801,12 @@ if(ANDROID) set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_FILESYSTEM_SOURCES}) set(HAVE_SDL_FILESYSTEM TRUE) 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) set(SDL_JOYSTICK_ANDROID 1) file(GLOB ANDROID_JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/android/*.c) diff --git a/include/SDL_config.h.cmake b/include/SDL_config.h.cmake index 18fa5a4fd..8f6d84402 100644 --- a/include/SDL_config.h.cmake +++ b/include/SDL_config.h.cmake @@ -265,6 +265,7 @@ #cmakedefine SDL_HAPTIC_IOKIT @SDL_HAPTIC_IOKIT@ #cmakedefine SDL_HAPTIC_DINPUT @SDL_HAPTIC_DINPUT@ #cmakedefine SDL_HAPTIC_XINPUT @SDL_HAPTIC_XINPUT@ +#cmakedefine SDL_HAPTIC_ANDROID @SDL_HAPTIC_ANDROID@ /* Enable various shared object loading systems */ #cmakedefine SDL_LOADSO_DLOPEN @SDL_LOADSO_DLOPEN@