summaryrefslogtreecommitdiffstats
path: root/externals
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2020-07-07 12:13:15 +0200
committerJan Beich <jbeich@FreeBSD.org>2020-07-07 12:13:18 +0200
commit2af7e40ce698eab25ac44cd492e7546e1010f16a (patch)
tree68123a630e1c44f0fb6427d882bade62f2a66d9c /externals
parentinput_common/gcadapter: add missing C++11 header required by libc++ (diff)
downloadyuzu-2af7e40ce698eab25ac44cd492e7546e1010f16a.tar
yuzu-2af7e40ce698eab25ac44cd492e7546e1010f16a.tar.gz
yuzu-2af7e40ce698eab25ac44cd492e7546e1010f16a.tar.bz2
yuzu-2af7e40ce698eab25ac44cd492e7546e1010f16a.tar.lz
yuzu-2af7e40ce698eab25ac44cd492e7546e1010f16a.tar.xz
yuzu-2af7e40ce698eab25ac44cd492e7546e1010f16a.tar.zst
yuzu-2af7e40ce698eab25ac44cd492e7546e1010f16a.zip
Diffstat (limited to 'externals')
-rw-r--r--externals/find-modules/FindLibUSB.cmake43
1 files changed, 43 insertions, 0 deletions
diff --git a/externals/find-modules/FindLibUSB.cmake b/externals/find-modules/FindLibUSB.cmake
new file mode 100644
index 000000000..dec0b98b0
--- /dev/null
+++ b/externals/find-modules/FindLibUSB.cmake
@@ -0,0 +1,43 @@
+# - Find libusb-1.0 library
+# This module defines
+# LIBUSB_INCLUDE_DIR, where to find bluetooth.h
+# LIBUSB_LIBRARIES, the libraries needed to use libusb-1.0.
+# LIBUSB_FOUND, If false, do not try to use libusb-1.0.
+#
+# Copyright (c) 2009, Michal Cihar, <michal@cihar.com>
+#
+# vim: expandtab sw=4 ts=4 sts=4:
+
+if(ANDROID)
+ set(LIBUSB_FOUND FALSE CACHE INTERNAL "libusb-1.0 found")
+ message(STATUS "libusb-1.0 not found.")
+elseif (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/libusb-1.0
+ /usr/local/include
+ )
+
+ find_library(LIBUSB_LIBRARIES NAMES usb-1.0 usb
+ 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 ()
+