[Development] New CMake version requirements for building and using Qt 6.2.0
alexandru.croitor at qt.io
Mon Aug 16 22:43:20 CEST 2021
The build system team raised the minimum required CMake version for the Qt 6.2.0 release.
Here is the summary:
To build Qt as shared libraries you need at least CMake version 3.16 (this was the case for Qt 6.1 as well).
To use that shared Qt build you will now need at least CMake 3.16 (up from 3.14). So user projects / examples will now require 3.16+.
To build Qt as STATIC libraries you will now need CMake 3.21.1 (up from 3.16).
To use that static Qt build you will now need CMake 3.21.1 (up from 3.14). So user projects / examples that use a static Qt now need 3.21.1+.
The most relevant configurations for static Qt are Qt for iOS and Qt for WebAssembly.
Some technical details:
The higher requirement for shared Qt builds is to ensure the existence of AUTOMOC Autogen.json files, which are used for the creation of user QML modules (new QML CMake API -> https://doc-snapshots.qt.io/qt6-dev/qt-add-qml-module.html
The higher requirement for static Qt builds is to overcome issues with linking object libraries across static libraries, which Qt uses extensively (for resources, plugin initializers, etc). This was the most pressing concern to address. Without the new version, users can get hard to debug (and fix) undefined symbol errors at link time.
More information about the Development