Skip to content

Commit

Permalink
Fixed bug 3918 - HIDAPI, CMake support for android project
Browse files Browse the repository at this point in the history
  • Loading branch information
1bsyl committed Aug 27, 2019
1 parent 13c4d5e commit 0a9c74a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
8 changes: 8 additions & 0 deletions CMakeLists.txt
Expand Up @@ -933,6 +933,10 @@ if(ANDROID)
list(APPEND EXTRA_LIBS ${ANDROID_DL_LIBRARY} ${ANDROID_LOG_LIBRARY} ${ANDROID_LIBRARY_LIBRARY})
add_definitions(-DGL_GLEXT_PROTOTYPES)

if (HAVE_HIDAPI)
list(APPEND EXTRA_LIBS hidapi)
endif()

#enable gles
if(VIDEO_OPENGLES)
set(SDL_VIDEO_OPENGL_EGL 1)
Expand Down Expand Up @@ -1863,6 +1867,10 @@ if (NOT ANDROID)
set_target_properties(SDL2main PROPERTIES DEBUG_POSTFIX ${SDL_CMAKE_DEBUG_POSTFIX})
endif()

if (ANDROID AND HAVE_HIDAPI)
set(_INSTALL_LIBS ${_INSTALL_LIBS} "hidapi")
endif()

if(SDL_SHARED)
add_library(SDL2 SHARED ${SOURCE_FILES} ${VERSION_SOURCES})
if(APPLE)
Expand Down
3 changes: 0 additions & 3 deletions android-project/app/jni/CMakeLists.txt
Expand Up @@ -2,9 +2,6 @@ cmake_minimum_required(VERSION 3.6)

project(GAME)

# Settings
set(HIDAPI OFF CACHE BOOL "" FORCE)

# armeabi-v7a requires cpufeatures library
# include(AndroidNdkModules)
# android_ndk_import_module_cpufeatures()
Expand Down

0 comments on commit 0a9c74a

Please sign in to comment.