From bd032c1f72078f0083baba2495d522f608318460 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Wed, 9 Dec 2020 07:26:59 -0800 Subject: [PATCH] Fixed bug 5221 - libusb isn't detected correctly in CMake Sven-Hendrik Haase In CMake I currently have trouble activating hidapi support as libusb-1.0 isn't ever correctly detected as it's searched for by the wrong name. configure.ac correctly does this: PKG_CHECK_MODULES([LIBUSB], [libusb-1.0], have_libusb=yes, have_libusb=no) However, sdlchecks.cmake does this: pkg_check_modules(LIBUSB libusb) but it needs to be: pkg_check_modules(LIBUSB libusb-1.0) --- cmake/sdlchecks.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/sdlchecks.cmake b/cmake/sdlchecks.cmake index 022b844c2..af5878380 100644 --- a/cmake/sdlchecks.cmake +++ b/cmake/sdlchecks.cmake @@ -1077,7 +1077,7 @@ macro(CheckHIDAPI) set(HAVE_HIDAPI TRUE) else() set(HAVE_HIDAPI FALSE) - pkg_check_modules(LIBUSB libusb) + pkg_check_modules(LIBUSB libusb-1.0) if (LIBUSB_FOUND) check_include_file(libusb.h HAVE_LIBUSB_H ${LIBUSB_CFLAGS}) if (HAVE_LIBUSB_H)