diff options
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index cd40e5cfe..ce46a2c2b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
| @@ -118,8 +118,17 @@ message(STATUS "Target architecture: ${ARCHITECTURE}") | |||
| 118 | # Configure C++ standard | 118 | # Configure C++ standard |
| 119 | # =========================== | 119 | # =========================== |
| 120 | 120 | ||
| 121 | set(CMAKE_CXX_STANDARD 17) | 121 | # boost asio's concept usage doesn't play nicely with some compilers yet. |
| 122 | set(CMAKE_CXX_STANDARD_REQUIRED ON) | 122 | add_definitions(-DBOOST_ASIO_DISABLE_CONCEPTS) |
| 123 | if (MSVC) | ||
| 124 | add_compile_options(/std:c++latest) | ||
| 125 | |||
| 126 | # cubeb and boost still make use of deprecated result_of. | ||
| 127 | add_definitions(-D_HAS_DEPRECATED_RESULT_OF) | ||
| 128 | else() | ||
| 129 | set(CMAKE_CXX_STANDARD 20) | ||
| 130 | set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
| 131 | endif() | ||
| 123 | 132 | ||
| 124 | # Output binaries to bin/ | 133 | # Output binaries to bin/ |
| 125 | set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin) | 134 | set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin) |
| @@ -151,7 +160,7 @@ macro(yuzu_find_packages) | |||
| 151 | # Cmake Pkg Prefix Version Conan Pkg | 160 | # Cmake Pkg Prefix Version Conan Pkg |
| 152 | "Boost 1.71 boost/1.72.0" | 161 | "Boost 1.71 boost/1.72.0" |
| 153 | "Catch2 2.11 catch2/2.11.0" | 162 | "Catch2 2.11 catch2/2.11.0" |
| 154 | "fmt 6.2 fmt/6.2.0" | 163 | "fmt 7.0 fmt/7.0.1" |
| 155 | # can't use until https://github.com/bincrafters/community/issues/1173 | 164 | # can't use until https://github.com/bincrafters/community/issues/1173 |
| 156 | #"libzip 1.5 libzip/1.5.2@bincrafters/stable" | 165 | #"libzip 1.5 libzip/1.5.2@bincrafters/stable" |
| 157 | "lz4 1.8 lz4/1.9.2" | 166 | "lz4 1.8 lz4/1.9.2" |
| @@ -211,7 +220,7 @@ if(ENABLE_QT) | |||
| 211 | 220 | ||
| 212 | set(QT_PREFIX_HINT HINTS "${QT_PREFIX}") | 221 | set(QT_PREFIX_HINT HINTS "${QT_PREFIX}") |
| 213 | endif() | 222 | endif() |
| 214 | find_package(Qt5 5.9 COMPONENTS Widgets OpenGL ${QT_PREFIX_HINT}) | 223 | find_package(Qt5 5.9 COMPONENTS Widgets ${QT_PREFIX_HINT}) |
| 215 | if (YUZU_USE_QT_WEB_ENGINE) | 224 | if (YUZU_USE_QT_WEB_ENGINE) |
| 216 | find_package(Qt5 COMPONENTS WebEngineCore WebEngineWidgets) | 225 | find_package(Qt5 COMPONENTS WebEngineCore WebEngineWidgets) |
| 217 | endif() | 226 | endif() |
| @@ -287,7 +296,7 @@ if (CONAN_REQUIRED_LIBS) | |||
| 287 | if(ENABLE_QT) | 296 | if(ENABLE_QT) |
| 288 | list(APPEND CMAKE_MODULE_PATH "${CONAN_QT_ROOT_RELEASE}") | 297 | list(APPEND CMAKE_MODULE_PATH "${CONAN_QT_ROOT_RELEASE}") |
| 289 | list(APPEND CMAKE_PREFIX_PATH "${CONAN_QT_ROOT_RELEASE}") | 298 | list(APPEND CMAKE_PREFIX_PATH "${CONAN_QT_ROOT_RELEASE}") |
| 290 | find_package(Qt5 5.9 REQUIRED COMPONENTS Widgets OpenGL) | 299 | find_package(Qt5 5.9 REQUIRED COMPONENTS Widgets) |
| 291 | if (YUZU_USE_QT_WEB_ENGINE) | 300 | if (YUZU_USE_QT_WEB_ENGINE) |
| 292 | find_package(Qt5 REQUIRED COMPONENTS WebEngineCore WebEngineWidgets) | 301 | find_package(Qt5 REQUIRED COMPONENTS WebEngineCore WebEngineWidgets) |
| 293 | endif() | 302 | endif() |
| @@ -330,13 +339,16 @@ elseif(SDL2_FOUND) | |||
| 330 | endif() | 339 | endif() |
| 331 | 340 | ||
| 332 | # Ensure libusb is properly configured (based on dolphin libusb include) | 341 | # Ensure libusb is properly configured (based on dolphin libusb include) |
| 333 | find_package(LibUSB) | 342 | if(NOT APPLE) |
| 343 | include(FindPkgConfig) | ||
| 344 | find_package(LibUSB) | ||
| 345 | endif() | ||
| 334 | if (NOT LIBUSB_FOUND) | 346 | if (NOT LIBUSB_FOUND) |
| 335 | add_subdirectory(externals/libusb) | 347 | add_subdirectory(externals/libusb) |
| 348 | set(LIBUSB_INCLUDE_DIR "") | ||
| 336 | set(LIBUSB_LIBRARIES usb) | 349 | set(LIBUSB_LIBRARIES usb) |
| 337 | endif() | 350 | endif() |
| 338 | 351 | ||
| 339 | |||
| 340 | # Prefer the -pthread flag on Linux. | 352 | # Prefer the -pthread flag on Linux. |
| 341 | set(THREADS_PREFER_PTHREAD_FLAG ON) | 353 | set(THREADS_PREFER_PTHREAD_FLAG ON) |
| 342 | find_package(Threads REQUIRED) | 354 | find_package(Threads REQUIRED) |