summaryrefslogtreecommitdiffstats
path: root/cmake/QtCMakePackageVersionFile.cmake.in
Commit message (Collapse)AuthorAgeFilesLines
* CMake: Allow flexible overriding of QT_NO_PACKAGE_VERSION_CHECKMichal Klocek2025-08-151-5/+5
| | | | | | | | | | | | | | In developer builds we allow mixing of package versions. However there was no way to bail out from this behavior as @extra_code@ always overrides the setting. Move QT_NO_PACKAGE_VERSION_CHECK after the @extra_code@ so that the behavior is configurable. Pick-to: 6.8 6.9 6.10 Task-number: QTBUG-103500 Change-Id: Ie64376b86aa02ad6550d78819f4eaf239064ca61 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Change license for .in filesLucie Gérard2024-03-051-0/+3
| | | | | | | | | | | | | According to QUIP-18 [1], all build system files should be BSD-3-Clause. The files in this patch are part of the build system. [1]: https://contribute.qt-project.org/quips/18 Pick-to: 6.7 Task-number: QTBUG-121787 Change-Id: Ibc6a60a9b009fab0c953e8e3269533c121e4511e Reviewed-by: Kai Köhne <kai.koehne@qt.io>
* Update qt_policy and add documentationAmir Masoud Abdol2023-01-301-0/+2
| | | | | | | | | | | | | | | | - If no version specified, policy version is set to 6.0.0, therefore warnings will be shown, encouraging users to set a policy. - Update qt_policy() documentation - Update qt_standard_project_setup() documentation - Update the policy warning message - Added the missing comment to clarify the extra_code region Pick-to: 6.5 Task-number: QTBUG-96233 Change-Id: I8358fdeb880a34c96f13fc2a6cbef6afe048c4d6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* CMake: Don't show the incompatible version warning when not neededAlexandru Croitor2022-07-011-1/+9
| | | | | | | | | | | | | | | | If a find_package(Qt6Foo) call has the QUIET option passed, don't display the incompatible version warning. Also if the find_package call has the EXACT option passed, and the searched for version does not match the package version exactly, there's no point in showing the warning because find_package will reject the package anyway, even if we set PACKAGE_VERSION_COMPATIBLE to TRUE Pick-to: 6.2 6.3 6.4 Change-Id: I78ef95cf4a045034fc50853465f3ba1db84bba63 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* CMake: Allow disabling package version checkAlexandru Croitor2021-10-271-0/+55
When building Qt repos, all find_package(Qt6) calls request a PROJECT_VERSION version which is set in .cmake.conf via QT_REPO_MODULE_VERSION. This means trying to configure qtsvg from a 6.3 branch using a 6.2 qtbase won't work, because qtsvg will call find_package(Qt6 6.3) and no such Qt6 package version exists. There are certain scenarios where it might be useful to try to do that though. One of them is doing Qt development while locally mixing branches. Another is building a 6.4 QtWebEngine against a 6.2 Qt. Allow to opt out of the version check by configuring each Qt repo with -DQT_NO_PACKAGE_VERSION_CHECK=TRUE. This setting is not recorded and will have to be set again when configuring another repo. The version check will also be disabled by default when configuring with the -developer-build feature. This will be recorded and embedded into each ConfigVersion file. If the version check is disabled, a warning will be shown mentioning the incompatible version of a package that was found but that package will still be accepted. The warning will show both when building Qt or using Qt in a user project. The warnings can be disabled by passing -DQT_NO_PACKAGE_VERSION_INCOMPATIBLE_WARNING=TRUE Furthermore when building a Qt repo, another warning will show when an incompatible package version is detected, to suggest to the Qt builder whether they want to use the incompatible version by disabling the version check. Note that there are no compatibility promises when using mixed non-matching versions. Things might not work. These options are only provided for convenience and their users know what they are doing. Pick-to: 6.2 Fixes: QTBUG-96458 Change-Id: I1a42e0b2a00b73513d776d89a76102ffd9136422 Reviewed-by: Craig Scott <craig.scott@qt.io>