SDL: SDL_hidapi requires libusb >= 1.0.16

From dd5b8db3a626c2f43419796419fa0d20436e54bb Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Fri, 24 Nov 2023 21:31:35 +0100
Subject: [PATCH] SDL_hidapi requires libusb >= 1.0.16

Co-authored-by: Ozkan Sezer <sezeroz@gmail.com>
---
 .github/workflows/cpactions.yml | 1 -
 cmake/sdlchecks.cmake           | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/.github/workflows/cpactions.yml b/.github/workflows/cpactions.yml
index b4ebb38d99d7..4a11b81686ad 100644
--- a/.github/workflows/cpactions.yml
+++ b/.github/workflows/cpactions.yml
@@ -51,7 +51,6 @@ jobs:
           cmake -S . -B build -GNinja  \
             -Wdeprecated -Wdev -Werror \
             -DCMAKE_BUILD_TYPE=Release \
-            -DSDL_HIDAPI_LIBUSB=OFF \
             -DSDL_CHECK_REQUIRED_INCLUDES="/usr/local/include" \
             -DSDL_CHECK_REQUIRED_LINK_OPTIONS="-L/usr/local/lib"
           cmake --build build/ --config Release --verbose -- -j`sysctl -n hw.ncpu`
diff --git a/cmake/sdlchecks.cmake b/cmake/sdlchecks.cmake
index f4723b312d08..6a0be91b21f6 100644
--- a/cmake/sdlchecks.cmake
+++ b/cmake/sdlchecks.cmake
@@ -1021,7 +1021,7 @@ macro(CheckHIDAPI)
     if(SDL_HIDAPI_LIBUSB)
       set(HAVE_LIBUSB FALSE)
 
-      set(LibUSB_PKG_CONFIG_SPEC libusb-1.0)
+      set(LibUSB_PKG_CONFIG_SPEC libusb-1.0>=1.0.16)
       pkg_check_modules(PC_LIBUSB IMPORTED_TARGET ${LibUSB_PKG_CONFIG_SPEC})
       if(PC_LIBUSB_FOUND)
         cmake_push_check_state()