Last active
August 29, 2015 14:19
-
-
Save dominicgs/1bcf4f383f17cb39934f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/host/cmake/modules/FindUSB1.cmake b/host/cmake/modules/FindUSB1.cmake | |
index 0cbf802..2f3138d 100644 | |
--- a/host/cmake/modules/FindUSB1.cmake | |
+++ b/host/cmake/modules/FindUSB1.cmake | |
@@ -24,10 +24,15 @@ else (LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES) | |
pkg_check_modules(PC_LIBUSB libusb-1.0) | |
ENDIF(NOT WIN32) | |
+ set(LIBUSB_LIBRARY_NAME usb-1.0) | |
+ IF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") | |
+ set(LIBUSB_LIBRARY_NAME usb) | |
+ ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") | |
+ | |
FIND_PATH(LIBUSB_INCLUDE_DIR libusb.h | |
PATHS ${PC_LIBUSB_INCLUDEDIR} ${PC_LIBUSB_INCLUDE_DIRS}) | |
- FIND_LIBRARY(LIBUSB_LIBRARIES NAMES usb-1.0 | |
+ FIND_LIBRARY(LIBUSB_LIBRARIES NAMES ${LIBUSB_LIBRARY_NAME} | |
PATHS ${PC_LIBUSB_LIBDIR} ${PC_LIBUSB_LIBRARY_DIRS}) | |
include(FindPackageHandleStandardArgs) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment