cmake: mark hidapi as disabled when not found
(cherry-picked from commit 19b13aab98ef02c93ed356af639d1e4ed0254906) (cherry-picked from commit c3495ec6eaaaf9f0d3250a9d39356154b869251c) (cherry-picked from commit 6dfd7a17e1d9ea94015bb0fda4c570f8b20781bd)
This commit is contained in:
parent
1e5daf1bef
commit
b8c6d3d7e1
@ -1192,6 +1192,7 @@ macro(CheckHIDAPI)
|
||||
if(HIDAPI_ONLY_LIBUSB AND NOT HAVE_LIBUSB)
|
||||
set(HAVE_HIDAPI FALSE)
|
||||
endif()
|
||||
set(HAVE_HIDAPI_LIBUSB ${HAVE_LIBUSB})
|
||||
endif()
|
||||
|
||||
if(HAVE_HIDAPI)
|
||||
@ -1211,6 +1212,8 @@ macro(CheckHIDAPI)
|
||||
file(GLOB HIDAPI_JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/hidapi/*.c)
|
||||
list(APPEND SOURCE_FILES ${HIDAPI_JOYSTICK_SOURCES})
|
||||
endif()
|
||||
else()
|
||||
set(SDL_HIDAPI_DISABLED 1)
|
||||
endif()
|
||||
else()
|
||||
set(SDL_HIDAPI_DISABLED 1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user