diff options
author | Josh Blum <josh@joshknows.com> | 2010-12-20 01:23:31 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-12-20 01:23:31 -0800 |
commit | 47c92a2ac68fbae59c02f3e2a322cabda499c13b (patch) | |
tree | 7cc4a4918b1feb09531607bfe22e976228034a70 /host/lib/transport | |
parent | 91e090295c8c623b73e20a4d217601c4453650a8 (diff) | |
download | uhd-47c92a2ac68fbae59c02f3e2a322cabda499c13b.tar.gz uhd-47c92a2ac68fbae59c02f3e2a322cabda499c13b.tar.bz2 uhd-47c92a2ac68fbae59c02f3e2a322cabda499c13b.zip |
uhd: implemented top-level component registry
now docs, examples, utils, usb, are configurable components with dependencies
Diffstat (limited to 'host/lib/transport')
-rw-r--r-- | host/lib/transport/CMakeLists.txt | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/host/lib/transport/CMakeLists.txt b/host/lib/transport/CMakeLists.txt index b5f1fc940..4d0a0f1f7 100644 --- a/host/lib/transport/CMakeLists.txt +++ b/host/lib/transport/CMakeLists.txt @@ -20,12 +20,12 @@ ######################################################################## # Setup libusb ######################################################################## -MESSAGE(STATUS "") -MESSAGE(STATUS "Configuring USB support...") LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/lib/transport) FIND_PACKAGE(USB1 REQUIRED) -IF(LIBUSB_FOUND) +LIBUHD_REGISTER_COMPONENT("USB" ENABLE_USB ON "ENABLE_LIBUHD;LIBUSB_FOUND" OFF) + +IF(ENABLE_USB) MESSAGE(STATUS "USB support enabled via libusb.") INCLUDE_DIRECTORIES(${LIBUSB_INCLUDE_DIR}) LIBUHD_APPEND_LIBS(${LIBUSB_LIBRARIES}) @@ -38,14 +38,11 @@ IF(LIBUSB_FOUND) IF(MSVC) #include our custom stdint for libusb INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/lib/transport/msvc) ENDIF(MSVC) - SET(HAVE_USB_SUPPORT TRUE) -ELSE(LIBUSB_FOUND) - MESSAGE(STATUS "USB support disabled.") +ELSE(ENABLE_USB) LIBUHD_APPEND_SOURCES( ${CMAKE_SOURCE_DIR}/lib/transport/usb_dummy_impl.cpp ) - SET(HAVE_USB_SUPPORT FALSE) -ENDIF(LIBUSB_FOUND) +ENDIF(ENABLE_USB) ######################################################################## # Check for SIMD headers |