[QBS] More MinGW fixes

Mathieu Bouchard mbouchar at gmail.com
Sat Feb 18 23:12:24 CET 2012


Hi,

Here is a patch that fixes the remaining problems I had with mingw on
Windows:

diff --git a/share/qbs/modules/cpp/GenericGCC.qbs
b/share/qbs/modules/cpp/GenericGCC.qbs
index 12f65e8..1ee0509 100644
--- a/share/qbs/modules/cpp/GenericGCC.qbs
+++ b/share/qbs/modules/cpp/GenericGCC.qbs
@@ -18,6 +18,8 @@ CppModule {
             path += toolchainInstallPath
             if (path.substr(-1) !== '/')
                 path += '/'
+            if (product.modules.qbs.toolchain == 'mingw')
+                path += 'bin/'
         }
         if (toolchainPrefix)
             path += toolchainPrefix
diff --git a/share/qbs/modules/qt/qtfunctions.js
b/share/qbs/modules/qt/qtfunctions.js
index c6dbf4d..ba19f5b 100644
--- a/share/qbs/modules/qt/qtfunctions.js
+++ b/share/qbs/modules/qt/qtfunctions.js
@@ -6,7 +6,10 @@ function getLibraryName(qtModule, targetOS, debugInfo)
     var libName
     if (isUnix)
         libName = qtModule
-    else if (targetOS == 'windows')
-        libName = qtModule + (debugInfo ? 'd' : '') + '4.lib'
+    else if (targetOS == 'windows') {
+        libName = qtModule + (debugInfo ? 'd' : '') + '4'
+        if (product.modules.qbs.toolchain != "mingw")
+            libName += ".lib"
+    }
     return libName
 }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20120218/059c5586/attachment.html>


More information about the Qbs mailing list