Search extra library paths for Android dependency XML files as well

This fixes a regression compared to Qt5. In Qt5 absoluteFilePath()
unconditionally searched for all files in extra prefix dirs and the Qt
install prefix, in particular also the -android-dependencies.xml files.

After the changes in Qt6 up to now however those files are only searched
in the Qt install prefix. This broke external libraries also making
use of the -android-dependencies.xml mechanism, such as some KDE
frameworks.

Pick-to: 6.5
Change-Id: Ic53aab50c70f853f3b1d621d6de6edb3df223905
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit d25438ebbd62cd10a435f6d7dd6a7ce181e3ac5f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Volker Krause 2023-10-04 17:37:28 +02:00 committed by Qt Cherry-pick Bot
parent 700c3ef931
commit 628f875b7a

View File

@ -1808,6 +1808,11 @@ static QString absoluteFilePath(const Options *options, const QString &relativeF
}
if (relativeFileName.endsWith("-android-dependencies.xml"_L1)) {
for (const auto &dir : options->extraLibraryDirs) {
const QString path = dir + u'/' + relativeFileName;
if (QFile::exists(path))
return path;
}
return options->qtInstallDirectory + u'/' + options->qtLibsDirectory +
u'/' + relativeFileName;
}