summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorlat9nq <22451773+lat9nq@users.noreply.github.com>2021-06-03 08:49:53 +0200
committerlat9nq <22451773+lat9nq@users.noreply.github.com>2021-06-03 08:49:53 +0200
commit55dd027115e72ca2ffc6a0bbf8f131d380c73faa (patch)
treeff8fa6ed08a9c80eaaa99952c4f31b7a3d349480 /CMakeLists.txt
parentyuzu qt: Revert some usages of string_view (diff)
downloadyuzu-55dd027115e72ca2ffc6a0bbf8f131d380c73faa.tar
yuzu-55dd027115e72ca2ffc6a0bbf8f131d380c73faa.tar.gz
yuzu-55dd027115e72ca2ffc6a0bbf8f131d380c73faa.tar.bz2
yuzu-55dd027115e72ca2ffc6a0bbf8f131d380c73faa.tar.lz
yuzu-55dd027115e72ca2ffc6a0bbf8f131d380c73faa.tar.xz
yuzu-55dd027115e72ca2ffc6a0bbf8f131d380c73faa.tar.zst
yuzu-55dd027115e72ca2ffc6a0bbf8f131d380c73faa.zip
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt12
1 files changed, 9 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ba207dfd1..c07be6f57 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -23,6 +23,8 @@ option(ENABLE_WEB_SERVICE "Enable web services (telemetry, etc.)" ON)
option(YUZU_USE_BUNDLED_BOOST "Download bundled Boost" OFF)
+option(YUZU_USE_BUNDLED_LIBUSB "Compile bundled libusb" OFF)
+
CMAKE_DEPENDENT_OPTION(YUZU_USE_BUNDLED_FFMPEG "Download/Build bundled FFmpeg" ON "WIN32" OFF)
option(YUZU_USE_QT_WEB_ENGINE "Use QtWebEngine for web applet implementation" OFF)
@@ -422,11 +424,15 @@ endif()
# Ensure libusb is properly configured (based on dolphin libusb include)
if(NOT APPLE)
include(FindPkgConfig)
- find_package(LibUSB)
+ if (PKG_CONFIG_FOUND)
+ pkg_check_modules(LIBUSB QUIET libusb-1.0>=1.0.24)
+ else()
+ find_package(LibUSB)
+ endif()
endif()
-if (NOT LIBUSB_FOUND)
+if (NOT LIBUSB_FOUND OR YUZU_USE_BUNDLED_LIBUSB)
add_subdirectory(externals/libusb)
- set(LIBUSB_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/externals/libusb/libusb/libusb")
+ set(LIBUSB_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/externals/libusb/libusb/libusb")
set(LIBUSB_LIBRARIES usb)
endif()