summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/windeployqt/utils.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/windeployqt/utils.cpp b/src/windeployqt/utils.cpp
index a331bac9e..e7a755500 100644
--- a/src/windeployqt/utils.cpp
+++ b/src/windeployqt/utils.cpp
@@ -725,7 +725,8 @@ inline QStringList readImportSections(const ImageNtHeader *ntHeaders, const void
return result;
}
-// Check for MSCV runtime (MSVCP120D.dll/MSVCP120.dll).
+// Check for MSCV runtime (MSVCP90D.dll/MSVCP90.dll, MSVCP120D.dll/MSVCP120.dll
+// or msvcp120d_app.dll/msvcp120_app.dll).
enum MsvcDebugRuntimeResult { MsvcDebugRuntime, MsvcReleaseRuntime, NoMsvcRuntime };
static inline MsvcDebugRuntimeResult checkMsvcDebugRuntime(const QStringList &dependentLibraries)
@@ -733,8 +734,13 @@ static inline MsvcDebugRuntimeResult checkMsvcDebugRuntime(const QStringList &de
foreach (const QString &lib, dependentLibraries) {
if (lib.startsWith(QLatin1String("MSVCR"), Qt::CaseInsensitive)
|| lib.startsWith(QLatin1String("MSVCP"), Qt::CaseInsensitive)) {
- return lib.endsWith(QLatin1String("D.dll"), Qt::CaseInsensitive)
- ? MsvcDebugRuntime : MsvcReleaseRuntime;
+ int pos = 5;
+ if (lib.at(pos).isDigit()) {
+ for (++pos; lib.at(pos).isDigit(); ++pos)
+ ;
+ return lib.at(pos).toLower() == QLatin1Char('d')
+ ? MsvcDebugRuntime : MsvcReleaseRuntime;
+ }
}
}
return NoMsvcRuntime;