From fc86e05ea6a2976d0e1004d20b5bf3e693621253 Mon Sep 17 00:00:00 2001 From: Marcus Hoffmann Date: Wed, 7 Aug 2024 16:49:53 +0200 Subject: [PATCH] CMakeLists.txt: also link to additional package-config libraries LibUSB might specify additional libraries to link to via package-config (i.e. libatomic where this isn't a builtin [1]). These are correctly discovered by the call to pkg_check_modules and put into the PC_LIBUSB_LIBRARIES variable but then never added to the actual linking step. Fix that by additionally adding them behind the libusb library discovered by the find_library call(). [1] https://github.com/libusb/libusb/blob/v1.0.27/configure.ac#L184 --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ff3e7874..d6e41da7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -58,7 +58,8 @@ else() pico_platform_headers pico_usb_reset_interface_headers picoboot_connection_cxx - ${LIBUSB_LIBRARIES}) + ${LIBUSB_LIBRARIES} + ${PC_LIBUSB_LIBRARIES}) # allow `make install` install(TARGETS picotool RUNTIME DESTINATION bin) endif()