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
2019-07-31 11:34:00 -05:00
parent 1b7fc81e3f
commit e149f4c4b0
2 changed files with 4 additions and 2 deletions

View File

@@ -1128,7 +1128,9 @@ elseif(UNIX AND NOT APPLE AND NOT ANDROID)
endif()
if(SDL_JOYSTICK)
CheckUSBHID() # seems to be BSD specific - limit the test to BSD only?
if(FREEBSD OR NETBSD OR OPENBSD OR BSDI)
CheckUSBHID()
endif()
CheckHIDAPI()
if(LINUX AND NOT ANDROID)
set(SDL_JOYSTICK_LINUX 1)