diff --git a/cmake/sdlchecks.cmake b/cmake/sdlchecks.cmake index a1bd68823233c6..9017f5382c2d2e 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 $) + sdl_link_dependency(hidapi INCLUDES $) endif() endif() endif()