diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2022-03-04 11:50:49 +0100 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2022-03-04 22:35:18 +0100 |
commit | 0332065357a5f65bb43d113f99a7138d0bc65261 (patch) | |
tree | ced9ffad455152c0098931e8842cfc62c13544d0 /configure.cmake | |
parent | d706d7ceb91507c71d779463cfc25982acaa36b1 (diff) | |
download | qtwebengine-0332065357a5f65bb43d113f99a7138d0bc65261.tar.gz |
CMake: Fail gracefully when using an unsupported CMake version
Previously if qtwebengine was configured with a CMake version lower
than 3.19, CMake would exit with a fatal error saying the version is
too low.
Now the CMake version check is delayed to the configure summary which
changes the hard error into a build time warning instead, just like
with all the other repo requirements.
An additional cmake_minimum_required call is used to require all 3.19
behaviors (upgraded policies) once configure establishes that the
CMake version is new enough.
Pick-to: 6.2 6.3
Change-Id: I03a20ae62ce2dcee23e5615241c6c97a86df4d2f
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'configure.cmake')
-rw-r--r-- | configure.cmake | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/configure.cmake b/configure.cmake index 40059662b..3baf5d4ad 100644 --- a/configure.cmake +++ b/configure.cmake @@ -366,6 +366,16 @@ else() set(WIN_ARM_64 OFF) endif() +add_check_for_support( + MODULES QtWebEngine QtPdf + CONDITION + CMAKE_VERSION + VERSION_GREATER_EQUAL + ${QT_SUPPORTED_MIN_CMAKE_VERSION_FOR_BUILDING_WEBENGINE} + MESSAGE + "Build requires CMake ${QT_SUPPORTED_MIN_CMAKE_VERSION_FOR_BUILDING_WEBENGINE} or higher." +) + assertTargets( MODULES QtWebEngine QtPdf TARGETS Gui Quick Qml |