cmake: detect libusb on FreeBSD

Source:
http://patch-tracker.debian.org/patch/series/view/rtl-sdr/0.5.0.4.4914-2/libusb-freebsd

Signed-off-by: Steve Markgraf <steve@steve-m.de>
master
Steve Markgraf 11 years ago
parent fbfa127889
commit 3969938eb6
  1. 11
      cmake/Modules/FindLibUSB.cmake

@ -8,7 +8,16 @@ if(NOT LIBUSB_FOUND)
/usr/local/include
)
find_library(LIBUSB_LIBRARIES NAMES usb-1.0
#standard library name for libusb-1.0
set(libusb1_library_names usb-1.0)
#libusb-1.0 compatible library on freebsd
if((CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") OR (CMAKE_SYSTEM_NAME STREQUAL "kFreeBSD"))
list(APPEND libusb1_library_names usb)
endif()
find_library(LIBUSB_LIBRARIES
NAMES ${libusb1_library_names}
PATHS
${LIBUSB_PKG_LIBRARY_DIRS}
/usr/lib

Loading…
Cancel
Save