raspberrypi / picotool

BSD 3-Clause "New" or "Revised" License
555 stars 95 forks source link

Make picotool build on FreeBSD #29

Closed arg08 closed 1 year ago

arg08 commented 3 years ago

Picotool currently doesn't quite build on FreeBSD because libusb (which is part of the base system rather than an add-on package) is just 'libusb' rather than 'libusb-1.0' even though it's compatible with the Linux -1.0 version.

So very simple patch makes it all work:

diff --git a/cmake/FindLIBUSB.cmake b/cmake/FindLIBUSB.cmake index c8cc62c..560e023 100644 --- a/cmake/FindLIBUSB.cmake +++ b/cmake/FindLIBUSB.cmake @@ -20,7 +20,7 @@ else (LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES) ENDIF(NOT WIN32) FIND_PATH(LIBUSB_INCLUDE_DIR libusb.h PATHS ${PC_LIBUSB_INCLUDEDIR} ${PC_LIBUSB_INCLUDE_DIRS})

ie. just add "usb" after "usb-1.0" on the FIND_LIBRARY line.

aallan commented 3 years ago

See also raspberrypi/pico-sdk#396.

lurch commented 3 years ago

Thanks, I've incorporated this suggestion into #27 :+1:

lurch commented 2 years ago

Fixed by https://github.com/raspberrypi/picotool/commit/757f2aee3c2c988b4d0c9c15907e243350381d0a ?

faelpinho commented 10 months ago

Just for note: I could build and install on Manjaro just forcing include to libusb. More: https://faelpinho.medium.com/how-to-install-picotool-on-manjaro-linux-6a5a3cfaf743