diff options
author | Johnathan Corgan | 2012-03-22 15:16:25 -0700 |
---|---|---|
committer | Johnathan Corgan | 2012-03-22 15:16:25 -0700 |
commit | fc115e6aa0c22af172cbfcb50c895a03218819ba (patch) | |
tree | f75c07fbcd92874356752177ed45226330400de6 /cmake/Modules/FindUSB.cmake | |
parent | 69c9100b8221f8b485e3acc07e99d5f410909d5e (diff) | |
parent | 81fba6490c6471e1db3bcc85d16ff2242f68fb43 (diff) | |
download | gnuradio-fc115e6aa0c22af172cbfcb50c895a03218819ba.tar.gz gnuradio-fc115e6aa0c22af172cbfcb50c895a03218819ba.tar.bz2 gnuradio-fc115e6aa0c22af172cbfcb50c895a03218819ba.zip |
Merge branch 'gr-fcd'
Diffstat (limited to 'cmake/Modules/FindUSB.cmake')
-rw-r--r-- | cmake/Modules/FindUSB.cmake | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/cmake/Modules/FindUSB.cmake b/cmake/Modules/FindUSB.cmake new file mode 100644 index 000000000..97f3db675 --- /dev/null +++ b/cmake/Modules/FindUSB.cmake @@ -0,0 +1,28 @@ +if(NOT LIBUSB_FOUND) + pkg_check_modules (LIBUSB_PKG libusb-1.0) + find_path(LIBUSB_INCLUDE_DIR NAMES libusb.h + PATHS + ${LIBUSB_PKG_INCLUDE_DIRS} + /usr/include/libusb-1.0 + /usr/include + /usr/local/include + ) + + find_library(LIBUSB_LIBRARIES NAMES usb-1.0 + PATHS + ${LIBUSB_PKG_LIBRARY_DIRS} + /usr/lib + /usr/local/lib + ) + +if(LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES) + set(LIBUSB_FOUND TRUE CACHE INTERNAL "libusb-1.0 found") + message(STATUS "Found libusb-1.0: ${LIBUSB_INCLUDE_DIR}, ${LIBUSB_LIBRARIES}") +else(LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES) + set(LIBUSB_FOUND FALSE CACHE INTERNAL "libusb-1.0 found") + message(STATUS "libusb-1.0 not found.") +endif(LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES) + +mark_as_advanced(LIBUSB_INCLUDE_DIR LIBUSB_LIBRARIES) + +endif(NOT LIBUSB_FOUND) |