From 5e50db78cc09dcfbc53026d1e9470125775a6755 Mon Sep 17 00:00:00 2001
From: Ray Donnelly <mingw.android@gmail.com>
Date: Sat, 29 Nov 2014 18:20:12 +0000
Subject: [PATCH 4/6] Use .dll.a instead of .a for mingw* import libraries

---
 src/lib/qtprofilesetup/qtmoduleinfo.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/share/qbs/module-providers/Qt/setup-qt.js b/share/qbs/module-providers/Qt/setup-qt.js
index 8e07335..acc58c4 100644
--- a/share/qbs/module-providers/Qt/setup-qt.js
+++ b/share/qbs/module-providers/Qt/setup-qt.js
@@ -713,9 +713,9 @@
                     if (qtProps.mkspecName.contains("msvc")) {
                         libFileName += ".lib";
                     } else if (isMingw) {
-                        libFileName += ".a";
+                        libFileName += isStaticLibrary ? ".a" : ".dll.a";
                         if (!File.exists(FileInfo.joinPaths(libDir, libFileName)))
-                            libFileName = libFileName.slice(0, -2) + ".dll";
+                            libFileName = isStaticLibrary ? libFileName.slice(0, -2) + ".dll" : libFileName.slice(0, -6) + ".dll";
                     }
                 }
                 libFilePath = FileInfo.joinPaths(libDir, libFileName);
-- 
2.3.5

