diff options
| author | 2022-12-05 22:03:34 +0100 | |
|---|---|---|
| committer | 2022-12-06 05:30:40 +0100 | |
| commit | f385175aa21f47b5f4830fcc65128b19ee46e2fe (patch) | |
| tree | 093eec7642239bb4cfbea05121870191d2f181f7 /CMakeLists.txt | |
| parent | Merge pull request #9385 from Morph1984/dynarmic-ver (diff) | |
| download | yuzu-f385175aa21f47b5f4830fcc65128b19ee46e2fe.tar.gz yuzu-f385175aa21f47b5f4830fcc65128b19ee46e2fe.tar.xz yuzu-f385175aa21f47b5f4830fcc65128b19ee46e2fe.zip | |
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 | |||
| 31 | 31 | ||
| 32 | option(ENABLE_WEB_SERVICE "Enable web services (telemetry, etc.)" ON) | 32 | option(ENABLE_WEB_SERVICE "Enable web services (telemetry, etc.)" ON) |
| 33 | 33 | ||
| 34 | option(YUZU_USE_BUNDLED_LIBUSB "Compile bundled libusb" OFF) | ||
| 35 | |||
| 36 | option(YUZU_USE_BUNDLED_FFMPEG "Download/Build bundled FFmpeg" "${WIN32}") | 34 | option(YUZU_USE_BUNDLED_FFMPEG "Download/Build bundled FFmpeg" "${WIN32}") |
| 37 | 35 | ||
| 38 | option(YUZU_USE_QT_MULTIMEDIA "Use QtMultimedia for Camera" OFF) | 36 | option(YUZU_USE_QT_MULTIMEDIA "Use QtMultimedia for Camera" OFF) |
| @@ -202,6 +200,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin) | |||
| 202 | find_package(enet 1.3) | 200 | find_package(enet 1.3) |
| 203 | find_package(fmt 9 REQUIRED) | 201 | find_package(fmt 9 REQUIRED) |
| 204 | find_package(inih) | 202 | find_package(inih) |
| 203 | find_package(libusb 1.0.24) | ||
| 205 | find_package(lz4 REQUIRED) | 204 | find_package(lz4 REQUIRED) |
| 206 | find_package(nlohmann_json 3.8 REQUIRED) | 205 | find_package(nlohmann_json 3.8 REQUIRED) |
| 207 | find_package(Opus 1.3) | 206 | find_package(Opus 1.3) |
| @@ -461,26 +460,6 @@ if (TARGET Boost::boost) | |||
| 461 | add_library(boost ALIAS Boost::boost) | 460 | add_library(boost ALIAS Boost::boost) |
| 462 | endif() | 461 | endif() |
| 463 | 462 | ||
| 464 | # Ensure libusb is properly configured (based on dolphin libusb include) | ||
| 465 | if(NOT YUZU_USE_BUNDLED_LIBUSB) | ||
| 466 | find_package(PkgConfig) | ||
| 467 | if (PKG_CONFIG_FOUND AND NOT CMAKE_SYSTEM_NAME MATCHES "DragonFly|FreeBSD") | ||
| 468 | pkg_check_modules(LIBUSB QUIET libusb-1.0>=1.0.24) | ||
| 469 | else() | ||
| 470 | find_package(LibUSB) | ||
| 471 | endif() | ||
| 472 | |||
| 473 | if (LIBUSB_FOUND) | ||
| 474 | add_library(usb INTERFACE) | ||
| 475 | target_include_directories(usb INTERFACE "${LIBUSB_INCLUDEDIR}" "${LIBUSB_INCLUDE_DIRS}") | ||
| 476 | target_link_directories(usb INTERFACE "${LIBUSB_LIBRARY_DIRS}") | ||
| 477 | target_link_libraries(usb INTERFACE "${LIBUSB_LIBRARIES}") | ||
| 478 | else() | ||
| 479 | message(WARNING "libusb not found, falling back to externals") | ||
| 480 | set(YUZU_USE_BUNDLED_LIBUSB ON) | ||
| 481 | endif() | ||
| 482 | endif() | ||
| 483 | |||
| 484 | # List of all FFmpeg components required | 463 | # List of all FFmpeg components required |
| 485 | set(FFmpeg_COMPONENTS | 464 | set(FFmpeg_COMPONENTS |
| 486 | avcodec | 465 | avcodec |