mirror of https://github.com/encounter/SDL.git
cmake: mark hidapi as disabled when not found
This commit is contained in:
parent
edfb00c25e
commit
19b13aab98
|
@ -1201,6 +1201,9 @@ macro(CheckHIDAPI)
|
||||||
if(HIDAPI_ONLY_LIBUSB AND NOT HAVE_LIBUSB)
|
if(HIDAPI_ONLY_LIBUSB AND NOT HAVE_LIBUSB)
|
||||||
set(HAVE_HIDAPI FALSE)
|
set(HAVE_HIDAPI FALSE)
|
||||||
endif()
|
endif()
|
||||||
|
if(NOT HAVE_LIBUSB)
|
||||||
|
set(HAVE_HIDAPI_LIBUSB FALSE)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(HAVE_HIDAPI)
|
if(HAVE_HIDAPI)
|
||||||
|
@ -1220,6 +1223,8 @@ macro(CheckHIDAPI)
|
||||||
file(GLOB HIDAPI_JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/hidapi/*.c)
|
file(GLOB HIDAPI_JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/hidapi/*.c)
|
||||||
list(APPEND SOURCE_FILES ${HIDAPI_JOYSTICK_SOURCES})
|
list(APPEND SOURCE_FILES ${HIDAPI_JOYSTICK_SOURCES})
|
||||||
endif()
|
endif()
|
||||||
|
else()
|
||||||
|
set(SDL_HIDAPI_DISABLED 0)
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
set(SDL_HIDAPI_DISABLED 1)
|
set(SDL_HIDAPI_DISABLED 1)
|
||||||
|
|
Loading…
Reference in New Issue