Fix prefix determination for windeployqt'ed MinGW applications
We hard-coded the assumption the import lib naming scheme is always
basename + ".lib" which is wrong for MinGW.
This amends commit a131d610
.
Fixes: QTBUG-80366
Change-Id: Ibefb8a54483cc62743b8783530644b03e720262c
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
parent
a131d6100c
commit
c33916a279
@ -574,11 +574,19 @@ static QString getRelocatablePrefix()
|
||||
const QString libdir = QString::fromLatin1(
|
||||
qt_configure_strs + qt_configure_str_offsets[QLibraryInfo::LibrariesPath - 1]);
|
||||
const QLatin1Char slash('/');
|
||||
const QString qtCoreImpLibPath
|
||||
= qtCoreDirPath
|
||||
#if defined(Q_CC_MINGW)
|
||||
const QString implibPrefix = QStringLiteral("lib");
|
||||
const QString implibSuffix = QStringLiteral(".a");
|
||||
#else
|
||||
const QString implibPrefix;
|
||||
const QString implibSuffix = QStringLiteral(".lib");
|
||||
#endif
|
||||
const QString qtCoreImpLibFileName = implibPrefix
|
||||
+ QFileInfo(qtCoreFilePath).completeBaseName() + implibSuffix;
|
||||
const QString qtCoreImpLibPath = qtCoreDirPath
|
||||
+ slash + QLatin1String(QT_CONFIGURE_LIBLOCATION_TO_PREFIX_PATH)
|
||||
+ slash + libdir
|
||||
+ slash + QFileInfo(qtCoreFilePath).completeBaseName() + QLatin1String(".lib");
|
||||
+ slash + qtCoreImpLibFileName;
|
||||
if (!QFileInfo::exists(qtCoreImpLibPath)) {
|
||||
// We did not find a corresponding import library and conclude that this is a
|
||||
// windeployqt'ed executable.
|
||||
|
Loading…
Reference in New Issue
Block a user