We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 5221 - libusb isn't detected correctly in CMake
Summary: libusb isn't detected correctly in CMake
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: joystick (show other bugs)
Version: HG 2.1
Hardware: x86_64 Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-03 09:54 UTC by Sven-Hendrik Haase
Modified: 2020-12-09 15:27 UTC (History)
1 user (show)

See Also:


Attachments
suggested patch (467 bytes, patch)
2020-07-03 09:54 UTC, Sven-Hendrik Haase
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sven-Hendrik Haase 2020-07-03 09:54:50 UTC
Created attachment 4401 [details]
suggested patch

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)
Comment 1 Sam Lantinga 2020-12-09 15:27:23 UTC
Patch added, thanks!
https://hg.libsdl.org/SDL/rev/9385c4d35e57