diff --git a/CMakeLists.txt b/CMakeLists.txt index 3c278aa199430..d21f7e46b19a8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -243,11 +243,7 @@ if(BUILD_CLIENT) endif() endif() -if (APPLE) - option(BUILD_WITH_WEBENGINE "BUILD_WITH_WEBENGINE" OFF) -else () - option(BUILD_WITH_WEBENGINE "BUILD_WITH_WEBENGINE" ON) -endif() +option(BUILD_WITH_WEBENGINE "BUILD_WITH_WEBENGINE" ON) if (NOT DEFINED APPLICATION_ICON_NAME) set(APPLICATION_ICON_NAME ${APPLICATION_SHORTNAME}) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 75c6f458295cf..997b84cab2503 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,6 +1,6 @@ include(ECMEnableSanitizers) -set(REQUIRED_QT_VERSION "5.15.0") +set(REQUIRED_QT_VERSION "6.5.0") find_package(Qt${QT_MAJOR_VERSION}Core ${REQUIRED_QT_VERSION} CONFIG QUIET) set_package_properties(Qt${QT_MAJOR_VERSION}Core PROPERTIES @@ -38,34 +38,37 @@ find_package(Qt${QT_VERSION_MAJOR}Core5Compat ${REQUIRED_QT_VERSION} CONFIG QUIE TYPE REQUIRED ) -find_package(Qt${QT_MAJOR_VERSION}WebEngineWidgets ${REQUIRED_QT_VERSION} CONFIG QUIET) -if(NOT BUILD_WITH_WEBENGINE) - set_package_properties(Qt${QT_MAJOR_VERSION}WebEngineWidgets PROPERTIES - DESCRIPTION "Qt${QT_MAJOR_VERSION} WebEngineWidgets component." +find_package(Qt${QT_VERSION_MAJOR}WebEngineCore ${REQUIRED_QT_VERSION} CONFIG QUIET) +if(APPLE) + set_package_properties(Qt${QT_VERSION_MAJOR}WebEngineCore PROPERTIES + DESCRIPTION "Qt${QT_VERSION_MAJOR} WebEngineCore component." TYPE RECOMMENDED ) else() - set_package_properties(Qt${QT_MAJOR_VERSION}WebEngineWidgets PROPERTIES - DESCRIPTION "Qt${QT_MAJOR_VERSION} WebEngineWidgets component." + set_package_properties(Qt${QT_VERSION_MAJOR}WebEngineCore PROPERTIES + DESCRIPTION "Qt${QT_VERSION_MAJOR} WebEngine component." TYPE REQUIRED ) endif() -find_package(Qt${QT_VERSION_MAJOR}WebEngineCore ${REQUIRED_QT_VERSION} CONFIG QUIET) -if(APPLE) - set_package_properties(Qt${QT_VERSION_MAJOR}WebEngineCore PROPERTIES - DESCRIPTION "Qt${QT_VERSION_MAJOR} WebEngineCore component." +find_package(Qt${QT_MAJOR_VERSION}WebEngineWidgets ${REQUIRED_QT_VERSION} CONFIG QUIET) +if(NOT BUILD_WITH_WEBENGINE) + set_package_properties(Qt${QT_MAJOR_VERSION}WebEngineWidgets PROPERTIES + DESCRIPTION "Qt${QT_MAJOR_VERSION} WebEngineWidgets component." TYPE RECOMMENDED ) else() - set_package_properties(Qt${QT_VERSION_MAJOR}WebEngine PROPERTIES - DESCRIPTION "Qt${QT_VERSION_MAJOR} WebEngine component." + set_package_properties(Qt${QT_MAJOR_VERSION}WebEngineWidgets PROPERTIES + DESCRIPTION "Qt${QT_MAJOR_VERSION} WebEngineWidgets component." TYPE REQUIRED ) endif() -if(Qt${QT_MAJOR_VERSION}WebEngine_FOUND AND Qt${QT_MAJOR_VERSION}WebEngineWidgets_FOUND) - add_compile_definitions(WITH_WEBENGINE=1) +if(Qt${QT_MAJOR_VERSION}WebEngineCore_FOUND AND Qt${QT_MAJOR_VERSION}WebEngineWidgets_FOUND) + message(STATUS "Enable use of Qt6 WebEngine module") + add_compile_definitions(WITH_WEBENGINE=1) +else() + message(STATUS "Disable use of Qt6 WebEngine module") endif() get_target_property (QT_QMAKE_EXECUTABLE Qt::qmake IMPORTED_LOCATION)