summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt24
1 files changed, 17 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ba207dfd1..97afaf1a9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -23,6 +23,8 @@ option(ENABLE_WEB_SERVICE "Enable web services (telemetry, etc.)" ON)
23 23
24option(YUZU_USE_BUNDLED_BOOST "Download bundled Boost" OFF) 24option(YUZU_USE_BUNDLED_BOOST "Download bundled Boost" OFF)
25 25
26option(YUZU_USE_BUNDLED_LIBUSB "Compile bundled libusb" OFF)
27
26CMAKE_DEPENDENT_OPTION(YUZU_USE_BUNDLED_FFMPEG "Download/Build bundled FFmpeg" ON "WIN32" OFF) 28CMAKE_DEPENDENT_OPTION(YUZU_USE_BUNDLED_FFMPEG "Download/Build bundled FFmpeg" ON "WIN32" OFF)
27 29
28option(YUZU_USE_QT_WEB_ENGINE "Use QtWebEngine for web applet implementation" OFF) 30option(YUZU_USE_QT_WEB_ENGINE "Use QtWebEngine for web applet implementation" OFF)
@@ -420,14 +422,22 @@ elseif (TARGET Boost::boost)
420endif() 422endif()
421 423
422# Ensure libusb is properly configured (based on dolphin libusb include) 424# Ensure libusb is properly configured (based on dolphin libusb include)
423if(NOT APPLE) 425if(NOT APPLE AND NOT YUZU_USE_BUNDLED_LIBUSB)
424 include(FindPkgConfig) 426 include(FindPkgConfig)
425 find_package(LibUSB) 427 if (PKG_CONFIG_FOUND)
426endif() 428 pkg_check_modules(LIBUSB QUIET libusb-1.0>=1.0.24)
427if (NOT LIBUSB_FOUND) 429 else()
428 add_subdirectory(externals/libusb) 430 find_package(LibUSB)
429 set(LIBUSB_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/externals/libusb/libusb/libusb") 431 endif()
430 set(LIBUSB_LIBRARIES usb) 432
433 if (LIBUSB_FOUND)
434 add_library(usb INTERFACE)
435 target_include_directories(usb INTERFACE "${LIBUSB_INCLUDE_DIRS}")
436 target_link_libraries(usb INTERFACE "${LIBUSB_LIBRARIES}")
437 else()
438 message(WARNING "libusb not found, falling back to externals")
439 set(YUZU_USE_BUNDLED_LIBUSB ON)
440 endif()
431endif() 441endif()
432 442
433# List of all FFmpeg components required 443# List of all FFmpeg components required