Warning, /frameworks/kdelibs4support/cmake/modules/FindUSB.cmake is written in an unsupported language. File is not indexed.

0001 # - Try to find the freetype library
0002 # Once done this defines
0003 #
0004 #  LIBUSB_FOUND - system has libusb
0005 #  LIBUSB_INCLUDE_DIR - the libusb include directory
0006 #  LIBUSB_LIBRARIES - Link these to use libusb
0007 
0008 # Copyright (c) 2006, 2008  Laurent Montel, <montel@kde.org>
0009 #
0010 # Redistribution and use is allowed according to the terms of the BSD license.
0011 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
0012 
0013 
0014 if (NOT WIN32)
0015   # use pkg-config to get the directories and then use these values
0016   # in the FIND_PATH() and FIND_LIBRARY() calls
0017   find_package(PkgConfig)
0018   pkg_check_modules(PC_LIBUSB QUIET libusb)
0019 endif(NOT WIN32)
0020 
0021 find_path(LIBUSB_INCLUDE_DIR usb.h
0022   HINTS ${PC_LIBUSB_INCLUDEDIR} ${PC_LIBUSB_INCLUDE_DIRS})
0023 
0024 find_library(LIBUSB_LIBRARIES NAMES usb
0025   HINTS ${PC_LIBUSB_LIBDIR} ${PC_LIBUSB_LIBRARY_DIRS})
0026 
0027 include(FindPackageHandleStandardArgs)
0028 find_package_handle_standard_args(LIBUSB  DEFAULT_MSG  LIBUSB_LIBRARIES LIBUSB_INCLUDE_DIR)
0029 
0030 # Compat. feature_summary expects the _FOUND variable to match the module name
0031 # TODO: KDE5 should probably be renamed FindLibUSB.cmake
0032 set(USB_FOUND ${LIBUSB_FOUND})
0033 
0034 mark_as_advanced(LIBUSB_INCLUDE_DIR LIBUSB_LIBRARIES)