From 97a9576c6e1b34e10737aeeb91bb600f24c0e80a Mon Sep 17 00:00:00 2001 From: Kevin Bradenstein Date: Sat, 5 Sep 2026 10:07:56 +0200 Subject: [PATCH] cmake: link libusb by its full path pkg_check_modules gives both LIBUSB_LIBRARIES (bare names, -lusb-1.0) and LIBUSB_LINK_LIBRARIES (absolute paths). Passing both links libusb twice, and the bare name only resolves when libusb is in the default library search path - which it is on Linux and is not under Homebrew on macOS, where the link fails with "library not found for -lusb-1.0". The full path alone is enough everywhere. --- CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 81bdb4e..fad9240 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,7 +32,6 @@ target_include_directories(${PROJECT_NAME} PUBLIC target_link_libraries(${PROJECT_NAME} PRIVATE ${GD_LIBRARIES} - ${LIBUSB_LIBRARIES} ${LIBUSB_LINK_LIBRARIES} ${Intl_LIBRARIES} ${ARGP_LIBRARIES}