cmake: mark hidapi as disabled when not found
(cherry-picked from commit19b13aab98) (cherry-picked from commitc3495ec6ea) (cherry-picked from commit6dfd7a17e1)
This commit is contained in:
1 parent
1e5daf1bef
commit
b8c6d3d7e1
1 file changed
+3
@@ -1192,6 +1192,7 @@ 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()
|
||||||
|
set(HAVE_HIDAPI_LIBUSB ${HAVE_LIBUSB})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(HAVE_HIDAPI)
|
if(HAVE_HIDAPI)
|
||||||
@@ -1211,6 +1212,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 1)
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
set(SDL_HIDAPI_DISABLED 1)
|
set(SDL_HIDAPI_DISABLED 1)
|
||||||
|
|||||||
Reference in new issue
Block a user