CMake: use ${PC_LIBUSB_LIBRARIES} instead of a library name
authorYegor Yefremov <yegorslists@googlemail.com>
Thu, 12 Oct 2023 07:11:13 +0000 (09:11 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Wed, 18 Oct 2023 15:30:26 +0000 (17:30 +0200)
Patch taken from the Debian package:
https://sources.debian.org/src/libftdi1/1.5-6/debian/patches/02-kfreebsd.diff/

cmake/FindLibUSB.cmake

index 766fc82..8bb3b11 100644 (file)
@@ -25,7 +25,7 @@ else (LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES)
     PATH_SUFFIXES libusb-1.0
     PATHS ${PC_LIBUSB_INCLUDEDIR} ${PC_LIBUSB_INCLUDE_DIRS})
 
-  find_library(LIBUSB_LIBRARIES NAMES usb-1.0
+  find_library(LIBUSB_LIBRARIES NAMES ${PC_LIBUSB_LIBRARIES}
     PATHS ${PC_LIBUSB_LIBDIR} ${PC_LIBUSB_LIBRARY_DIRS})
 
   include(FindPackageHandleStandardArgs)