From 667ad8ad2d299ffa582519118002bd6de4d6522c Mon Sep 17 00:00:00 2001 From: ExploShot Date: Wed, 4 Nov 2020 18:05:10 +0100 Subject: [PATCH 1/2] Update default.cmake and hunter.cmake --- cmake/configs/default.cmake | 2 +- cmake/projects/Qt/hunter.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 8b69506a24..d249dd3e4a 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -128,7 +128,7 @@ if(_is_linux OR MINGW) elseif(IOS OR ANDROID) hunter_default_version(Qt VERSION 5.9.1-p0) else() - hunter_default_version(Qt VERSION 5.11.3) + hunter_default_version(Qt VERSION 5.15.1) endif() hunter_default_version(QtAndroidCMake VERSION 1.0.9) diff --git a/cmake/projects/Qt/hunter.cmake b/cmake/projects/Qt/hunter.cmake index 6eff7f8dbc..ddfe3a69b3 100644 --- a/cmake/projects/Qt/hunter.cmake +++ b/cmake/projects/Qt/hunter.cmake @@ -271,6 +271,17 @@ hunter_add_version( cf1bbdf0e69a651a67738e9b3e616e0dd9cf3087 ) +hunter_add_version( + PACKAGE_NAME + Qt + VERSION + "5.15.1" + URL + "https://download.qt.io/archive/qt/5.15/5.15.1/single/qt-everywhere-src-5.15.1.tar.xz" + SHA1 + 2b91346b382cc1c54f0f9b49f005f658bfff00af +) + hunter_cacheable(Qt) if(NOT APPLE AND NOT WIN32) From 73fe1b728b7aebde0e551eb8244a22f75b9f7daf Mon Sep 17 00:00:00 2001 From: ExploShot Date: Wed, 4 Nov 2020 18:25:09 +0100 Subject: [PATCH 2/2] Update hunter_generate_qt_5_15_info.cmake and hunter_generate_qt_info.cmake --- .../hunter_generate_qt_5_15_info.cmake | 186 ++++++++++++++++++ cmake/modules/hunter_generate_qt_info.cmake | 9 + 2 files changed, 195 insertions(+) create mode 100644 cmake/modules/hunter_generate_qt_5_15_info.cmake diff --git a/cmake/modules/hunter_generate_qt_5_15_info.cmake b/cmake/modules/hunter_generate_qt_5_15_info.cmake new file mode 100644 index 0000000000..43c7acc4f8 --- /dev/null +++ b/cmake/modules/hunter_generate_qt_5_15_info.cmake @@ -0,0 +1,186 @@ +# Copyright (c) 2015-2019, Ruslan Baratov +# All rights reserved. + +include(hunter_internal_error) +include(hunter_qt_add_module) +include(hunter_assert_not_empty_string) + +# See cmake/projects/Qt/generate.sh + +# This function will be used in build scheme too so it's better to set +# regular CMake variables like WIN32 or ANDROID explicitly by is_{android,win32} + +function( + hunter_generate_qt_5_15_info + component_name + skip_components_varname + component_depends_on_varname + is_android + is_win32 +) + hunter_assert_not_empty_string("${component_name}") + hunter_assert_not_empty_string("${skip_components_varname}") + hunter_assert_not_empty_string("${component_depends_on_varname}") + + string(COMPARE NOTEQUAL "${ARGN}" "" has_unparsed) + if(has_unparsed) + hunter_internal_error("Unparsed argument: ${ARGN}") + endif() + + set( + all_components + qt3d + qtactiveqt + qtandroidextras + qtbase + qtcanvas3d + qtcharts + qtconnectivity + qtdatavis3d + qtdeclarative + qtdoc + qtgamepad + qtgraphicaleffects + qtimageformats + qtlocation + qtmacextras + qtmultimedia + qtnetworkauth + qtpurchasing + qtqa + qtquickcontrols + qtquickcontrols2 + qtremoteobjects + qtrepotools + qtscript + qtscxml + qtsensors + qtserialbus + qtserialport + qtspeech + qtsvg + qttools + qttranslations + qtvirtualkeyboard + qtwayland + qtwebchannel + qtwebengine + qtwebglplugin + qtwebsockets + qtwebview + qtwinextras + qtx11extras + qtxmlpatterns + ) + + # This is modified copy/paste code from /qt.pro + + if(is_android) + set(ANDROID_EXTRAS qtandroidextras) + else() + set(ANDROID_EXTRAS "") + endif() + + if(is_win32) + set(ACTIVE_QT qtactiveqt) + else() + # Project MESSAGE: ActiveQt is a Windows Desktop-only module. Will just generate a docs target. + set(ACTIVE_QT "") + endif() + + # Order is important. Component of each section should not depends on entry + # from section below. + + # Components are in list but not exists in fact: + # * qtdocgallery + # * qtfeedback + # * qtpim + # * qtsystems + + # Depends on nothing + hunter_qt_add_module(NAME qtbase) + # -- + + # Depends only on qtbase + hunter_qt_add_module(NAME qtandroidextras COMPONENTS qtbase) + hunter_qt_add_module(NAME qtmacextras COMPONENTS qtbase) + hunter_qt_add_module(NAME qtx11extras COMPONENTS qtbase) + hunter_qt_add_module(NAME qtsvg COMPONENTS qtbase) + hunter_qt_add_module(NAME ${ACTIVE_QT} COMPONENTS qtbase) + hunter_qt_add_module(NAME qtimageformats COMPONENTS qtbase) + hunter_qt_add_module(NAME qtserialport COMPONENTS qtbase) + # -- + + # -- + hunter_qt_add_module(NAME qtxmlpatterns COMPONENTS qtsvg) + # -- + + # -- + hunter_qt_add_module(NAME qtdeclarative COMPONENTS qtxmlpatterns) + # -- + + # Depends only on qtbase/qtdeclarative + hunter_qt_add_module(NAME qtcanvas3d COMPONENTS qtdeclarative) + hunter_qt_add_module(NAME qtdoc COMPONENTS qtdeclarative) + hunter_qt_add_module(NAME qtgraphicaleffects COMPONENTS qtdeclarative) + hunter_qt_add_module(NAME qtmultimedia COMPONENTS qtbase qtdeclarative) + hunter_qt_add_module(NAME qtsensors COMPONENTS qtbase qtdeclarative) + hunter_qt_add_module(NAME qtwayland COMPONENTS qtbase qtdeclarative) + hunter_qt_add_module(NAME qtwebsockets COMPONENTS qtbase qtdeclarative) + # -- + + # -- + hunter_qt_add_module(NAME qtquickcontrols COMPONENTS qtdeclarative qtgraphicaleffects) + hunter_qt_add_module(NAME qtwinextras COMPONENTS qtbase qtdeclarative qtmultimedia) + hunter_qt_add_module(NAME qtconnectivity COMPONENTS qtbase ${ANDROID_EXTRAS} qtdeclarative) + hunter_qt_add_module(NAME qtwebchannel COMPONENTS qtbase qtdeclarative qtwebsockets) + hunter_qt_add_module(NAME qt3d COMPONENTS qtdeclarative qtimageformats) + hunter_qt_add_module(NAME qtwebglplugin COMPONENTS qtbase qtdeclarative qtwebsockets) + # -- + + # -- + hunter_qt_add_module(NAME qtlocation COMPONENTS qtbase qtdeclarative qtquickcontrols) + hunter_qt_add_module(NAME qtquickcontrols2 COMPONENTS qtquickcontrols) + # -- + + # -- + hunter_qt_add_module(NAME qttools COMPONENTS qtbase qtdeclarative ${ACTIVE_QT}) + hunter_qt_add_module(NAME qtwebengine COMPONENTS qtquickcontrols qtwebchannel qtlocation) + # -- + + # -- + hunter_qt_add_module(NAME qtwebview COMPONENTS qtdeclarative qtwebengine) + hunter_qt_add_module(NAME qtscript COMPONENTS qtbase qttools) + hunter_qt_add_module(NAME qttranslations COMPONENTS qttools) + # -- + + string(COMPARE EQUAL "${component_name}" "qtbase" is_qtbase) + string(COMPARE EQUAL "${component_${component_name}_depends_on}" "" depends_on_nothing) + if(is_qtbase) + if(NOT depends_on_nothing) + hunter_internal_error("qtbase should not depends on anything") + endif() + else() + if(depends_on_nothing) + hunter_internal_error( + "component `${component_name}` should have at least one dependency:" + " qtbase" + ) + endif() + endif() + + set( + "${component_depends_on_varname}" + "${component_${component_name}_depends_on}" + PARENT_SCOPE + ) + + set(skip_list ${all_components}) + list( + REMOVE_ITEM + skip_list + "${component_name}" + ${component_${component_name}_depends_on} + ) + set("${skip_components_varname}" "${skip_list}" PARENT_SCOPE) +endfunction() diff --git a/cmake/modules/hunter_generate_qt_info.cmake b/cmake/modules/hunter_generate_qt_info.cmake index 6ba6f132b6..228391e9dc 100644 --- a/cmake/modules/hunter_generate_qt_info.cmake +++ b/cmake/modules/hunter_generate_qt_info.cmake @@ -7,6 +7,7 @@ include(hunter_generate_qt_5_9_info) include(hunter_generate_qt_5_10_info) include(hunter_generate_qt_5_11_info) include(hunter_generate_qt_5_12_info) +include(hunter_generate_qt_5_15_info) include(hunter_assert_not_empty_string) include(hunter_user_error) @@ -80,6 +81,14 @@ function( "${is_android}" "${is_win32}" ) + elseif(qt_version MATCHES "^5\\.15\\.") + hunter_generate_qt_5_15_info( + "${component_name}" + toskip + depends_on + "${is_android}" + "${is_win32}" + ) else() hunter_user_error("Unexpected Qt version") endif()