SDL: cmake: fix SDL_HIDAPI_LIBUSB

From deec574ff6f507545e5ee4dda3b7c3584399d26f Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Fri, 28 Jul 2023 01:16:06 +0200
Subject: [PATCH] cmake: fix SDL_HIDAPI_LIBUSB

---
 cmake/sdlchecks.cmake | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cmake/sdlchecks.cmake b/cmake/sdlchecks.cmake
index 20bb1d8f4dd3..1bfe8676d348 100644
--- a/cmake/sdlchecks.cmake
+++ b/cmake/sdlchecks.cmake
@@ -1028,7 +1028,7 @@ macro(CheckHIDAPI)
       pkg_check_modules(PC_LIBUSB IMPORTED_TARGET ${LibUSB_PKG_CONFIG_SPEC})
       if(PC_LIBUSB_FOUND)
         cmake_push_check_state()
-        list(APPEND CMAKE_REQUIRED_INCLUDES ${LibUSB_INCLUDE_DIRS})
+        list(APPEND CMAKE_REQUIRED_INCLUDES ${PC_LIBUSB_INCLUDE_DIRS})
         check_include_file(libusb.h HAVE_LIBUSB_H)
         cmake_pop_check_state()
         if(HAVE_LIBUSB_H)
@@ -1041,7 +1041,7 @@ macro(CheckHIDAPI)
             if(USB_1.0_LIB)
               set(SDL_LIBUSB_DYNAMIC "\"${USB_1.0_LIB_SONAME}\"")
             endif()
-            sdl_link_dependency(hidapi INCLUDES $<TARGET_PROPERTY:LibUSB::LibUSB,INTERFACE_INCLUDE_DIRECTORIES>)
+            sdl_link_dependency(hidapi INCLUDES $<TARGET_PROPERTY:PkgConfig::PC_LIBUSB,INTERFACE_INCLUDE_DIRECTORIES>)
           endif()
         endif()
       endif()