summaryrefslogtreecommitdiffstats
path: root/software/libosmosdr/cmake/Modules/FindLibUSB.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'software/libosmosdr/cmake/Modules/FindLibUSB.cmake')
-rw-r--r--software/libosmosdr/cmake/Modules/FindLibUSB.cmake11
1 files changed, 10 insertions, 1 deletions
diff --git a/software/libosmosdr/cmake/Modules/FindLibUSB.cmake b/software/libosmosdr/cmake/Modules/FindLibUSB.cmake
index 97f3db6..54d57a5 100644
--- a/software/libosmosdr/cmake/Modules/FindLibUSB.cmake
+++ b/software/libosmosdr/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