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().
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