mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-11-01 07:36:22 +00:00
58b280afb6
git-svn-id: https://svn.code.sf.net/p/gnss-sdr/code/trunk@368 64b25241-fba3-4117-9849-534c7e92360d
30 lines
831 B
CMake
30 lines
831 B
CMake
INCLUDE(FindPkgConfig)
|
|
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)
|