cmake: more hidapi fixes.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0d623bf..461fd77 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1095,10 +1095,6 @@ if(ANDROID)
list(APPEND EXTRA_LIBS ${ANDROID_DL_LIBRARY} ${ANDROID_LOG_LIBRARY} ${ANDROID_LIBRARY_LIBRARY})
target_compile_definitions(sdl-build-options INTERFACE "-DGL_GLEXT_PROTOTYPES")
- if (HAVE_HIDAPI)
- list(APPEND EXTRA_LIBS hidapi)
- endif()
-
#enable gles
if(SDL_OPENGLES)
set(SDL_VIDEO_OPENGL_EGL 1)
@@ -1701,10 +1697,6 @@ elseif(WINDOWS)
if(SDL_JOYSTICK)
CheckHIDAPI()
- # TODO: Remove this hid.c block when SDL_hidapi.c is supported on Windows!
- if(HAVE_HIDAPI)
- set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/hidapi/windows/hid.c)
- endif()
if(NOT WINDOWS_STORE)
set(SDL_JOYSTICK_RAWINPUT 1)
endif()
@@ -2635,10 +2627,6 @@ if(NOT WINDOWS_STORE)
endif()
endif()
-if (ANDROID AND HAVE_HIDAPI)
- set(_INSTALL_LIBS ${_INSTALL_LIBS} "hidapi")
-endif()
-
if(ANDROID)
target_include_directories(sdl-build-options INTERFACE "${ANDROID_NDK}/sources/android/cpufeatures")
endif()
@@ -2689,24 +2677,6 @@ if(SDL_SHARED)
endif()
endif()
-if(ANDROID)
- if(HAVE_HIDAPI)
- add_library(hidapi SHARED ${SDL2_SOURCE_DIR}/src/hidapi/android/hid.cpp)
- # alias target for in-tree builds
- add_library(SDL2::hidapi ALIAS hidapi)
- endif()
-
- if(MSVC AND NOT SDL_LIBC)
- # Don't try to link with the default set of libraries.
- set_target_properties(hidapi PROPERTIES LINK_FLAGS_RELEASE "/NODEFAULTLIB")
- set_target_properties(hidapi PROPERTIES LINK_FLAGS_DEBUG "/NODEFAULTLIB")
- set_target_properties(hidapi PROPERTIES STATIC_LIBRARY_FLAGS "/NODEFAULTLIB")
- endif()
- if(HAVE_HIDAPI)
- target_link_libraries(hidapi log)
- endif()
-endif()
-
if(SDL_STATIC)
set (BUILD_SHARED_LIBS FALSE)
add_library(SDL2-static STATIC ${SOURCE_FILES})