diff options
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index cdf63a030..facf4ea5f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
| @@ -3,6 +3,10 @@ | |||
| 3 | 3 | ||
| 4 | cmake_minimum_required(VERSION 3.22) | 4 | cmake_minimum_required(VERSION 3.22) |
| 5 | 5 | ||
| 6 | # Dynarmic has cmake_minimum_required(3.12) and we may want to override | ||
| 7 | # some of its variables, which is only possible in 3.13+ | ||
| 8 | set(CMAKE_POLICY_DEFAULT_CMP0077 NEW) | ||
| 9 | |||
| 6 | list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules") | 10 | list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules") |
| 7 | list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/externals/cmake-modules") | 11 | list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/externals/cmake-modules") |
| 8 | list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/externals/find-modules") | 12 | list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/externals/find-modules") |
| @@ -71,7 +75,8 @@ if (YUZU_USE_PRECOMPILED_HEADERS) | |||
| 71 | # buildcache does not properly cache PCH files, leading to compilation errors. | 75 | # buildcache does not properly cache PCH files, leading to compilation errors. |
| 72 | # See https://github.com/mbitsnbites/buildcache/discussions/230 | 76 | # See https://github.com/mbitsnbites/buildcache/discussions/230 |
| 73 | message(WARNING "buildcache does not properly support Precompiled Headers. Disabling PCH") | 77 | message(WARNING "buildcache does not properly support Precompiled Headers. Disabling PCH") |
| 74 | set(YUZU_USE_PRECOMPILED_HEADERS OFF) | 78 | set(DYNARMIC_USE_PRECOMPILED_HEADERS OFF CACHE BOOL "" FORCE) |
| 79 | set(YUZU_USE_PRECOMPILED_HEADERS OFF CACHE BOOL "" FORCE) | ||
| 75 | endif() | 80 | endif() |
| 76 | endif() | 81 | endif() |
| 77 | if (YUZU_USE_PRECOMPILED_HEADERS) | 82 | if (YUZU_USE_PRECOMPILED_HEADERS) |
| @@ -444,7 +449,7 @@ if (TARGET Boost::boost) | |||
| 444 | endif() | 449 | endif() |
| 445 | 450 | ||
| 446 | # Ensure libusb is properly configured (based on dolphin libusb include) | 451 | # Ensure libusb is properly configured (based on dolphin libusb include) |
| 447 | if(NOT APPLE AND NOT YUZU_USE_BUNDLED_LIBUSB) | 452 | if(NOT YUZU_USE_BUNDLED_LIBUSB) |
| 448 | find_package(PkgConfig) | 453 | find_package(PkgConfig) |
| 449 | if (PKG_CONFIG_FOUND AND NOT CMAKE_SYSTEM_NAME MATCHES "DragonFly|FreeBSD") | 454 | if (PKG_CONFIG_FOUND AND NOT CMAKE_SYSTEM_NAME MATCHES "DragonFly|FreeBSD") |
| 450 | pkg_check_modules(LIBUSB QUIET libusb-1.0>=1.0.24) | 455 | pkg_check_modules(LIBUSB QUIET libusb-1.0>=1.0.24) |
| @@ -454,7 +459,8 @@ if(NOT APPLE AND NOT YUZU_USE_BUNDLED_LIBUSB) | |||
| 454 | 459 | ||
| 455 | if (LIBUSB_FOUND) | 460 | if (LIBUSB_FOUND) |
| 456 | add_library(usb INTERFACE) | 461 | add_library(usb INTERFACE) |
| 457 | target_include_directories(usb INTERFACE "${LIBUSB_INCLUDE_DIRS}") | 462 | target_include_directories(usb INTERFACE "${LIBUSB_INCLUDEDIR}" "${LIBUSB_INCLUDE_DIRS}") |
| 463 | target_link_directories(usb INTERFACE "${LIBUSB_LIBRARY_DIRS}") | ||
| 458 | target_link_libraries(usb INTERFACE "${LIBUSB_LIBRARIES}") | 464 | target_link_libraries(usb INTERFACE "${LIBUSB_LIBRARIES}") |
| 459 | else() | 465 | else() |
| 460 | message(WARNING "libusb not found, falling back to externals") | 466 | message(WARNING "libusb not found, falling back to externals") |