diff options
Diffstat (limited to 'host/cmake/Modules')
-rw-r--r-- | host/cmake/Modules/FindUSB1.cmake | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/host/cmake/Modules/FindUSB1.cmake b/host/cmake/Modules/FindUSB1.cmake index a1ab4ca90..a494e1350 100644 --- a/host/cmake/Modules/FindUSB1.cmake +++ b/host/cmake/Modules/FindUSB1.cmake @@ -40,12 +40,17 @@ endif() if(LIBUSB_LIBRARIES) set(CMAKE_REQUIRED_LIBRARIES ${LIBUSB_LIBRARIES}) endif() -CHECK_FUNCTION_EXISTS("libusb_handle_events_timeout_completed" HAVE_LIBUSB_HANDLE_EVENTS_TIMEOUT_COMPLETED) +CHECK_FUNCTION_EXISTS("libusb_handle_events_timeout_completed" HAVE_LIBUSB_HANDLE_EVENTS_TIMEOUT_COMPLETED) if(HAVE_LIBUSB_HANDLE_EVENTS_TIMEOUT_COMPLETED) list(APPEND LIBUSB_DEFINITIONS "HAVE_LIBUSB_HANDLE_EVENTS_TIMEOUT_COMPLETED=1") endif(HAVE_LIBUSB_HANDLE_EVENTS_TIMEOUT_COMPLETED) +CHECK_FUNCTION_EXISTS("libusb_error_name" HAVE_LIBUSB_ERROR_NAME) +if(HAVE_LIBUSB_ERROR_NAME) + list(APPEND LIBUSB_DEFINITIONS "HAVE_LIBUSB_ERROR_NAME=1") +endif(HAVE_LIBUSB_ERROR_NAME) + include(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBUSB DEFAULT_MSG LIBUSB_LIBRARIES LIBUSB_INCLUDE_DIRS) MARK_AS_ADVANCED(LIBUSB_INCLUDE_DIRS LIBUSB_LIBRARIES) |