-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CMake: Dont use pkg-config to find libusb on Mac OSX, rewrite to CMak…
…e find module (tested on homebrew only)
- Loading branch information
Showing
2 changed files
with
32 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# FindLibUSB.cmake - Try to find the Hiredis library | ||
# Once done this will define | ||
# | ||
# LIBUSB_FOUND - System has libusb | ||
# LIBUSB_INCLUDE_DIR - The libusb include directory | ||
# LIBUSB_LIBRARIES - The libraries needed to use libusb | ||
# LIBUSB_DEFINITIONS - Compiler switches required for using libusb | ||
|
||
FIND_PATH(LIBUSB_INCLUDE_DIR NAMES libusb.h | ||
HINTS | ||
/usr | ||
/usr/local | ||
/opt | ||
PATH_SUFFIXES libusb-1.0 | ||
) | ||
|
||
FIND_LIBRARY(LIBUSB_LIBRARIES NAMES usb-1.0 | ||
HINTS | ||
/usr | ||
/usr/local | ||
/opt | ||
) | ||
|
||
INCLUDE(FindPackageHandleStandardArgs) | ||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Libusb DEFAULT_MSG LIBUSB_LIBRARIES LIBUSB_INCLUDE_DIR) | ||
|
||
MARK_AS_ADVANCED(LIBUSB_INCLUDE_DIR LIBUSB_LIBRARIES) |