cmake: Fix locating libusb header at configure-time

Removing the CheckUSBHID call is necessary to avoid caching the failed header
check result before we find libusb via pkg-config.
This commit is contained in:
Andrew Eikum committed 2019-07-31 11:34:00 -05:00
1 parent 1b7fc81e3f
commit e149f4c4b0
2 files changed
+4 -2

No files matched your search

+1 -1
View File
@@ -1074,7 +1074,7 @@ macro(CheckHIDAPI)
set(HAVE_HIDAPI FALSE)
pkg_check_modules(LIBUSB libusb)
if (LIBUSB_FOUND)
check_include_file(libusb.h HAVE_LIBUSB_H)
check_include_file(libusb.h HAVE_LIBUSB_H ${LIBUSB_CFLAGS})
if (HAVE_LIBUSB_H)
set(HAVE_HIDAPI TRUE)
endif()