Skip to content

Commit

Permalink
Fixed bug 5221 - libusb isn't detected correctly in CMake
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
slouken committed Dec 9, 2020
1 parent 7fa5e95 commit bd032c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmake/sdlchecks.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit bd032c1

Please sign in to comment.