raspberrypi / picotool

BSD 3-Clause "New" or "Revised" License
566 stars 100 forks source link

CMakeLists.txt: also link to additional package-config libraries #103

Open BubuOT opened 1 month ago

BubuOT commented 1 month ago

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