raspberrypi / usbboot

Raspberry Pi USB booting code, moved from tools repository
Apache License 2.0
914 stars 231 forks source link

Use pkg-config to locate libusb-1.0 #107

Closed thesuperzapper closed 2 years ago

thesuperzapper commented 2 years ago

This PR resolves https://github.com/raspberrypi/usbboot/issues/81, and closes https://github.com/raspberrypi/usbboot/pull/25.

This is a very simple change that uses pkg-config to locate libusb-1.0 rather than assuming its path, allowing users who have installed libusb-1.0 with homebrew to successfully build with make.


Thanks to @khorben (PR: #25) and @Parnoud (Issue: https://github.com/raspberrypi/usbboot/issues/81#issuecomment-851637615) for laying out the solution.

thesuperzapper commented 2 years ago

@pelwell, @peterharperuk, or @timg236 I would really appreciate your quick look at this, as macOS users can't sucessfully build without this small change.

pelwell commented 2 years ago

Although initially concerned about it being a more heavyweight solution, even CygWin has pkg-config, so most users should be able to cope.