summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt30
1 files changed, 10 insertions, 20 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5df2ff3fa..eb403205c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -29,16 +29,10 @@ option(YUZU_USE_BUNDLED_FFMPEG "Download/Build bundled FFmpeg" "${WIN32}")
29 29
30option(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)
31 31
32option(YUZU_ENABLE_BOXCAT "Enable the Boxcat service, a yuzu high-level implementation of BCAT" ON)
33
34option(ENABLE_CUBEB "Enables the cubeb audio backend" ON) 32option(ENABLE_CUBEB "Enables the cubeb audio backend" ON)
35 33
36option(USE_DISCORD_PRESENCE "Enables Discord Rich Presence" OFF) 34option(USE_DISCORD_PRESENCE "Enables Discord Rich Presence" OFF)
37 35
38if (NOT ENABLE_WEB_SERVICE)
39 set(YUZU_ENABLE_BOXCAT OFF)
40endif()
41
42# Default to a Release build 36# Default to a Release build
43get_property(IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) 37get_property(IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
44if (NOT IS_MULTI_CONFIG AND NOT CMAKE_BUILD_TYPE) 38if (NOT IS_MULTI_CONFIG AND NOT CMAKE_BUILD_TYPE)
@@ -135,7 +129,7 @@ endif()
135# boost asio's concept usage doesn't play nicely with some compilers yet. 129# boost asio's concept usage doesn't play nicely with some compilers yet.
136add_definitions(-DBOOST_ASIO_DISABLE_CONCEPTS) 130add_definitions(-DBOOST_ASIO_DISABLE_CONCEPTS)
137if (MSVC) 131if (MSVC)
138 add_compile_options(/std:c++latest) 132 add_compile_options($<$<COMPILE_LANGUAGE:CXX>:/std:c++latest>)
139 133
140 # cubeb and boost still make use of deprecated result_of. 134 # cubeb and boost still make use of deprecated result_of.
141 add_definitions(-D_HAS_DEPRECATED_RESULT_OF) 135 add_definitions(-D_HAS_DEPRECATED_RESULT_OF)
@@ -243,7 +237,7 @@ yuzu_find_packages()
243 237
244# Qt5 requires that we find components, so it doesn't fit our pretty little find package function 238# Qt5 requires that we find components, so it doesn't fit our pretty little find package function
245if(ENABLE_QT) 239if(ENABLE_QT)
246 set(QT_VERSION 5.12) 240 set(QT_VERSION 5.15)
247 # We want to load the generated conan qt config so that we get the QT_ROOT var so that we can use the official 241 # We want to load the generated conan qt config so that we get the QT_ROOT var so that we can use the official
248 # Qt5Config inside the root folder instead of the conan generated one. 242 # Qt5Config inside the root folder instead of the conan generated one.
249 if(EXISTS ${CMAKE_BINARY_DIR}/qtConfig.cmake) 243 if(EXISTS ${CMAKE_BINARY_DIR}/qtConfig.cmake)
@@ -345,8 +339,8 @@ if(ENABLE_QT)
345 set(QT_PREFIX_HINT) 339 set(QT_PREFIX_HINT)
346 340
347 if(YUZU_USE_BUNDLED_QT) 341 if(YUZU_USE_BUNDLED_QT)
348 if ((MSVC_VERSION GREATER_EQUAL 1910 AND MSVC_VERSION LESS 1930) AND ARCHITECTURE_x86_64) 342 if ((MSVC_VERSION GREATER_EQUAL 1920 AND MSVC_VERSION LESS 1940) AND ARCHITECTURE_x86_64)
349 set(QT_BUILD qt-5.12.8-msvc2017_64) 343 set(QT_BUILD qt-5.15.2-msvc2019_64)
350 elseif ((${CMAKE_SYSTEM_NAME} STREQUAL "Linux") AND NOT MINGW AND ARCHITECTURE_x86_64) 344 elseif ((${CMAKE_SYSTEM_NAME} STREQUAL "Linux") AND NOT MINGW AND ARCHITECTURE_x86_64)
351 set(QT_BUILD qt5_5_15_2) 345 set(QT_BUILD qt5_5_15_2)
352 else() 346 else()
@@ -375,7 +369,7 @@ endif()
375if (ENABLE_SDL2) 369if (ENABLE_SDL2)
376 if (YUZU_USE_BUNDLED_SDL2) 370 if (YUZU_USE_BUNDLED_SDL2)
377 # Detect toolchain and platform 371 # Detect toolchain and platform
378 if ((MSVC_VERSION GREATER_EQUAL 1910 AND MSVC_VERSION LESS 1930) AND ARCHITECTURE_x86_64) 372 if ((MSVC_VERSION GREATER_EQUAL 1920 AND MSVC_VERSION LESS 1940) AND ARCHITECTURE_x86_64)
379 set(SDL2_VER "SDL2-2.0.16") 373 set(SDL2_VER "SDL2-2.0.16")
380 else() 374 else()
381 message(FATAL_ERROR "No bundled SDL2 binaries for your toolchain. Disable YUZU_USE_BUNDLED_SDL2 and provide your own.") 375 message(FATAL_ERROR "No bundled SDL2 binaries for your toolchain. Disable YUZU_USE_BUNDLED_SDL2 and provide your own.")
@@ -417,17 +411,13 @@ if (CONAN_REQUIRED_LIBS)
417 # Download conan.cmake automatically, you can also just copy the conan.cmake file 411 # Download conan.cmake automatically, you can also just copy the conan.cmake file
418 if(NOT EXISTS "${CMAKE_BINARY_DIR}/conan.cmake") 412 if(NOT EXISTS "${CMAKE_BINARY_DIR}/conan.cmake")
419 message(STATUS "Downloading conan.cmake from https://github.com/conan-io/cmake-conan") 413 message(STATUS "Downloading conan.cmake from https://github.com/conan-io/cmake-conan")
420 file(DOWNLOAD "https://github.com/conan-io/cmake-conan/raw/v0.15/conan.cmake" 414 # TODO: Use a tagged release. The latest tagged release does not support VS2022 as of this writing.
415 file(DOWNLOAD "https://raw.githubusercontent.com/conan-io/cmake-conan/43e385830ee35377dbd2dcbe8d5a9e750301ea00/conan.cmake"
421 "${CMAKE_BINARY_DIR}/conan.cmake") 416 "${CMAKE_BINARY_DIR}/conan.cmake")
422 endif() 417 endif()
423 include(${CMAKE_BINARY_DIR}/conan.cmake) 418 include(${CMAKE_BINARY_DIR}/conan.cmake)
424 419
425 set(CONAN_LIB_OPTIONS 420 conan_check(VERSION 1.41.0 REQUIRED)
426 libzip:with_openssl=False
427 libzip:enable_windows_crypto=False
428 )
429
430 conan_check(VERSION 1.24.0 REQUIRED)
431 421
432 # Manually add iconv to fix a dep conflict between qt and sdl2 422 # Manually add iconv to fix a dep conflict between qt and sdl2
433 # We don't need to add it through find_package or anything since the other two can find it just fine 423 # We don't need to add it through find_package or anything since the other two can find it just fine
@@ -473,7 +463,7 @@ if (CONAN_REQUIRED_LIBS)
473 if(ENABLE_QT) 463 if(ENABLE_QT)
474 list(APPEND CMAKE_MODULE_PATH "${CONAN_QT_ROOT_RELEASE}") 464 list(APPEND CMAKE_MODULE_PATH "${CONAN_QT_ROOT_RELEASE}")
475 list(APPEND CMAKE_PREFIX_PATH "${CONAN_QT_ROOT_RELEASE}") 465 list(APPEND CMAKE_PREFIX_PATH "${CONAN_QT_ROOT_RELEASE}")
476 find_package(Qt5 5.12 REQUIRED COMPONENTS Widgets) 466 find_package(Qt5 5.15 REQUIRED COMPONENTS Widgets)
477 if (YUZU_USE_QT_WEB_ENGINE) 467 if (YUZU_USE_QT_WEB_ENGINE)
478 find_package(Qt5 REQUIRED COMPONENTS WebEngineCore WebEngineWidgets) 468 find_package(Qt5 REQUIRED COMPONENTS WebEngineCore WebEngineWidgets)
479 endif() 469 endif()
@@ -780,7 +770,7 @@ endif()
780# against all the src files. This should be used before making a pull request. 770# against all the src files. This should be used before making a pull request.
781# ======================================================================= 771# =======================================================================
782 772
783set(CLANG_FORMAT_POSTFIX "-10") 773set(CLANG_FORMAT_POSTFIX "-12")
784find_program(CLANG_FORMAT 774find_program(CLANG_FORMAT
785 NAMES clang-format${CLANG_FORMAT_POSTFIX} 775 NAMES clang-format${CLANG_FORMAT_POSTFIX}
786 clang-format 776 clang-format