D23551: CMake config files: use as min dep version the Qt version we built against
Friedrich W. H. Kossebau
noreply at phabricator.kde.org
Thu Aug 29 00:17:22 BST 2019
kossebau created this revision.
kossebau added reviewers: Frameworks, aacid.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
kossebau requested review of this revision.
REVISION SUMMARY
Some developers have multiple versions of Qt installed on their system.
And source code often has some version-dependent code paths, e.g. using
newer API if found available. In that case the resulting build has an
effective dependency on the Qt version built against.
To properly reflect that, the Qt version set as minimally required version
of the listed dependencies in the generated CMake config files should use
that version instead.
More, KXmlGui uses private API with Qt5::CorePrivate, so also future
versions of Qt5::Core might not be compatible.
While the current code of KXmlGui does not have such version dependent
code variants, they are added now and then, so using the Qt version built
against as minimally required dependency is a good default, and should not
change anything for all the users with just one Qt version, and improve
things for those with, catching bad mixes early in the build time.
And given the use of private Qt::Core API, requiring exactly the same
version by using "find_dependency(Qt5Core @USED_QT_VERSION@ EXACT)"
should be more safe, even if the private API might be stable in reality
for a set of versions.
TEST PLAN
Generated CMake config files now uses with the find_dependency(Qt5) calls
the version of the Qt KXmlGui was built against.
REPOSITORY
R263 KXmlGui
BRANCH
setusetqtversionasmindep
REVISION DETAIL
https://phabricator.kde.org/D23551
AFFECTED FILES
CMakeLists.txt
KF5XmlGuiConfig.cmake.in
To: kossebau, #frameworks, aacid
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190828/18565c4a/attachment.html>
More information about the Kde-frameworks-devel
mailing list