|
|
|
@ -146,10 +146,19 @@ cmake_dependent_option(YUZU_USE_EXTERNAL_SDL2 "Build SDL2 from external source" |
|
|
|
cmake_dependent_option(YUZU_USE_BUNDLED_SDL2 "Download bundled SDL2 build" "${MSVC}" "ENABLE_SDL2" OFF) |
|
|
|
|
|
|
|
# qt stuff |
|
|
|
option(ENABLE_QT "Enable the Qt frontend" ON) |
|
|
|
option(ENABLE_QT "Enable the Qt frontends" ON) |
|
|
|
cmake_dependent_option(ENABLE_QT_QML "Enable the experimental Qt Quick frontend" OFF "ENABLE_QT" OFF) |
|
|
|
cmake_dependent_option(ENABLE_QT_WIDGETS "Enable the stable Qt Widgets frontend" ON "ENABLE_QT" OFF) |
|
|
|
|
|
|
|
if (ENABLE_QT AND NOT ENABLE_QT_QML AND NOT ENABLE_QT_WIDGETS) |
|
|
|
message(FATAL_ERROR "ENABLE_QT specified without a valid frontend") |
|
|
|
endif() |
|
|
|
|
|
|
|
option(ENABLE_QT_TRANSLATION "Enable translations for the Qt frontend" OFF) |
|
|
|
option(ENABLE_UPDATE_CHECKER "Enable update checker (for Qt and Android)" OFF) |
|
|
|
|
|
|
|
cmake_dependent_option(YUZU_USE_BUNDLED_QT "Download bundled Qt binaries" "${MSVC}" "ENABLE_QT" OFF) |
|
|
|
|
|
|
|
option(YUZU_USE_QT_MULTIMEDIA "Use QtMultimedia for Camera" OFF) |
|
|
|
option(YUZU_USE_QT_WEB_ENGINE "Use QtWebEngine for web applet implementation" OFF) |
|
|
|
set(YUZU_QT_MIRROR "" CACHE STRING "What mirror to use for downloading the bundled Qt libraries") |
|
|
|
@ -562,7 +571,7 @@ find_package(VulkanUtilityLibraries) |
|
|
|
find_package(SimpleIni) |
|
|
|
find_package(SPIRV-Tools) |
|
|
|
find_package(sirit) |
|
|
|
find_package(gamemode) |
|
|
|
find_package(gamemode) |
|
|
|
|
|
|
|
if (ARCHITECTURE_x86 OR ARCHITECTURE_x86_64) |
|
|
|
find_package(xbyak) |
|
|
|
@ -608,24 +617,35 @@ if (ENABLE_QT) |
|
|
|
list(APPEND CMAKE_PREFIX_PATH "${Qt6_DIR}") |
|
|
|
endif() |
|
|
|
|
|
|
|
find_package(Qt6 REQUIRED COMPONENTS Widgets Concurrent) |
|
|
|
# Best practice is to ask for all components at once, so they are from the same version |
|
|
|
set(YUZU_QT_COMPONENTS Core Widgets Concurrent) |
|
|
|
|
|
|
|
if (PLATFORM_LINUX) |
|
|
|
list(APPEND YUZU_QT_COMPONENTS DBus) |
|
|
|
set(YUZU_OPTIONAL_QT GuiPrivate) |
|
|
|
endif() |
|
|
|
|
|
|
|
if (ENABLE_QT_QML) |
|
|
|
list(APPEND YUZU_QT_COMPONENTS Quick QuickControls2) |
|
|
|
endif() |
|
|
|
|
|
|
|
if (YUZU_USE_QT_MULTIMEDIA) |
|
|
|
find_package(Qt6 REQUIRED COMPONENTS Multimedia) |
|
|
|
list(APPEND YUZU_QT_COMPONENTS Multimedia) |
|
|
|
endif() |
|
|
|
|
|
|
|
if (CMAKE_SYSTEM_NAME STREQUAL "Linux") |
|
|
|
# yes Qt, we get it |
|
|
|
set(QT_NO_PRIVATE_MODULE_WARNING ON) |
|
|
|
find_package(Qt6 REQUIRED COMPONENTS DBus OPTIONAL_COMPONENTS GuiPrivate) |
|
|
|
elseif (UNIX AND NOT APPLE) |
|
|
|
find_package(Qt6 REQUIRED COMPONENTS DBus Gui) |
|
|
|
if (YUZU_USE_QT_WEB_ENGINE) |
|
|
|
list(APPEND YUZU_QT_COMPONENTS WebEngineCore WebEngineWidgets) |
|
|
|
endif() |
|
|
|
|
|
|
|
if (ENABLE_QT_TRANSLATION) |
|
|
|
find_package(Qt6 REQUIRED COMPONENTS LinguistTools) |
|
|
|
list(APPEND YUZU_QT_COMPONENTS LinguistTools) |
|
|
|
endif() |
|
|
|
|
|
|
|
find_package(Qt6 REQUIRED COMPONENTS ${YUZU_QT_COMPONENTS} OPTIONAL_COMPONENTS ${YUZU_OPTIONAL_QT}) |
|
|
|
set(QT_MAJOR_VERSION 6) |
|
|
|
# Qt6 sets cxx_std_17 and we need to undo that |
|
|
|
set_target_properties(Qt6::Platform PROPERTIES INTERFACE_COMPILE_FEATURES "") |
|
|
|
|
|
|
|
if (NOT DEFINED QT_TARGET_PATH) |
|
|
|
get_target_property(qtcore_path Qt6::Core LOCATION_Release) |
|
|
|
string(FIND "${qtcore_path}" "/bin/" qtcore_path_bin_pos REVERSE) |
|
|
|
@ -645,30 +665,9 @@ if (ENABLE_QT) |
|
|
|
message(STATUS "Using host Qt at ${QT_HOST_PATH}") |
|
|
|
endif() |
|
|
|
|
|
|
|
function(set_yuzu_qt_components) |
|
|
|
# Best practice is to ask for all components at once, so they are from the same version |
|
|
|
set(YUZU_QT_COMPONENTS2 Core Widgets Concurrent) |
|
|
|
if (PLATFORM_LINUX) |
|
|
|
list(APPEND YUZU_QT_COMPONENTS2 DBus) |
|
|
|
endif() |
|
|
|
if (YUZU_USE_QT_MULTIMEDIA) |
|
|
|
list(APPEND YUZU_QT_COMPONENTS2 Multimedia) |
|
|
|
endif() |
|
|
|
if (YUZU_USE_QT_WEB_ENGINE) |
|
|
|
list(APPEND YUZU_QT_COMPONENTS2 WebEngineCore WebEngineWidgets) |
|
|
|
endif() |
|
|
|
if (ENABLE_QT_TRANSLATION) |
|
|
|
list(APPEND YUZU_QT_COMPONENTS2 LinguistTools) |
|
|
|
endif() |
|
|
|
set(YUZU_QT_COMPONENTS ${YUZU_QT_COMPONENTS2} PARENT_SCOPE) |
|
|
|
endfunction(set_yuzu_qt_components) |
|
|
|
|
|
|
|
if(ENABLE_QT) |
|
|
|
set_yuzu_qt_components() |
|
|
|
find_package(Qt6 REQUIRED COMPONENTS ${YUZU_QT_COMPONENTS}) |
|
|
|
set(QT_MAJOR_VERSION 6) |
|
|
|
# Qt6 sets cxx_std_17 and we need to undo that |
|
|
|
set_target_properties(Qt6::Platform PROPERTIES INTERFACE_COMPILE_FEATURES "") |
|
|
|
if (UNIX AND NOT APPLE AND NOT ANDROID) |
|
|
|
find_package(PkgConfig REQUIRED) |
|
|
|
pkg_check_modules(LIBVA libva) |
|
|
|
endif() |
|
|
|
|
|
|
|
if (NOT (YUZU_USE_BUNDLED_FFMPEG OR YUZU_USE_EXTERNAL_FFMPEG)) |
|
|
|
|