aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/transport/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/transport/CMakeLists.txt')
-rw-r--r--host/lib/transport/CMakeLists.txt24
1 files changed, 24 insertions, 0 deletions
diff --git a/host/lib/transport/CMakeLists.txt b/host/lib/transport/CMakeLists.txt
index bde2b72b9..71a3a1494 100644
--- a/host/lib/transport/CMakeLists.txt
+++ b/host/lib/transport/CMakeLists.txt
@@ -18,6 +18,30 @@
#This file will be included by cmake, use absolute paths!
########################################################################
+# Setup libusb
+########################################################################
+LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/lib/transport)
+FIND_PACKAGE(USB1 REQUIRED)
+
+IF(LIBUSB_FOUND)
+ INCLUDE_DIRECTORIES(${LIBUSB_INCLUDE_DIR})
+ LIBUHD_APPEND_LIBS(${LIBUSB_LIBRARIES})
+ LIBUHD_APPEND_SOURCES(
+ ${CMAKE_SOURCE_DIR}/lib/transport/libusb1_control.cpp
+ ${CMAKE_SOURCE_DIR}/lib/transport/libusb1_zero_copy.cpp
+ ${CMAKE_SOURCE_DIR}/lib/transport/libusb1_base.cpp
+ ${CMAKE_SOURCE_DIR}/lib/transport/libusb1_device_handle.cpp
+ )
+ SET(HAVE_USB_SUPPORT TRUE)
+ENDIF(LIBUSB_FOUND)
+
+IF(HAVE_USB_SUPPORT)
+ MESSAGE(STATUS "Has USB support - found")
+ELSE(HAVE_USB_SUPPORT)
+ MESSAGE(STATUS "Has USB support - not found")
+ENDIF(HAVE_USB_SUPPORT)
+
+########################################################################
# Check for SIMD headers
########################################################################
INCLUDE(CheckIncludeFileCXX)