diff options
| author | liamwhite <liamwhite@users.noreply.github.com> | 2022-12-06 09:58:37 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-06 09:58:37 -0500 |
| commit | e86e144a7c3a6039f1262b53e6f56ccdb9ce3cc0 (patch) | |
| tree | e2a5afc9febee986ad1f1e1f565e10d13cb887d9 /CMakeLists.txt | |
| parent | 99494e77c31f50fc94cb5108f3a2c584a13632ce (diff) | |
| parent | f385175aa21f47b5f4830fcc65128b19ee46e2fe (diff) | |
Merge pull request #9387 from abouvier/cmake-libusb
cmake: prefer system libusb
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 523cf81ac..a2bdee819 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,8 +31,6 @@ CMAKE_DEPENDENT_OPTION(YUZU_USE_BUNDLED_QT "Download bundled Qt binaries" "${MSV option(ENABLE_WEB_SERVICE "Enable web services (telemetry, etc.)" ON) -option(YUZU_USE_BUNDLED_LIBUSB "Compile bundled libusb" OFF) - option(YUZU_USE_BUNDLED_FFMPEG "Download/Build bundled FFmpeg" "${WIN32}") option(YUZU_USE_QT_MULTIMEDIA "Use QtMultimedia for Camera" OFF) @@ -202,6 +200,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin) find_package(enet 1.3) find_package(fmt 9 REQUIRED) find_package(inih) +find_package(libusb 1.0.24) find_package(lz4 REQUIRED) find_package(nlohmann_json 3.8 REQUIRED) find_package(Opus 1.3) @@ -461,26 +460,6 @@ if (TARGET Boost::boost) add_library(boost ALIAS Boost::boost) endif() -# Ensure libusb is properly configured (based on dolphin libusb include) -if(NOT YUZU_USE_BUNDLED_LIBUSB) - find_package(PkgConfig) - if (PKG_CONFIG_FOUND AND NOT CMAKE_SYSTEM_NAME MATCHES "DragonFly|FreeBSD") - pkg_check_modules(LIBUSB QUIET libusb-1.0>=1.0.24) - else() - find_package(LibUSB) - endif() - - if (LIBUSB_FOUND) - add_library(usb INTERFACE) - target_include_directories(usb INTERFACE "${LIBUSB_INCLUDEDIR}" "${LIBUSB_INCLUDE_DIRS}") - target_link_directories(usb INTERFACE "${LIBUSB_LIBRARY_DIRS}") - target_link_libraries(usb INTERFACE "${LIBUSB_LIBRARIES}") - else() - message(WARNING "libusb not found, falling back to externals") - set(YUZU_USE_BUNDLED_LIBUSB ON) - endif() -endif() - # List of all FFmpeg components required set(FFmpeg_COMPONENTS avcodec |
