aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@digia.com>2013-11-13 11:41:30 +0100
committerJoerg Bornemann <joerg.bornemann@digia.com>2013-11-13 17:18:43 +0100
commit4cbe7af03f20e45db094cd052181a2422c02192e (patch)
tree6b8fb2377166e80e89ab55416be788e6c797fd70
parent16a257aabaadadf25ee08814a85fed8590462754 (diff)
detect-toolchains: set qbs.architecture for MinGW
Task-number: QBS-446 Change-Id: I1c67c780dad5b5cc0444ede950809ae3cf71c67a Reviewed-by: Christian Kandeler <christian.kandeler@digia.com> Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
-rw-r--r--src/app/detect-toolchains/probe.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/app/detect-toolchains/probe.cpp b/src/app/detect-toolchains/probe.cpp
index 5f440af16..ddd87cc92 100644
--- a/src/app/detect-toolchains/probe.cpp
+++ b/src/app/detect-toolchains/probe.cpp
@@ -203,6 +203,11 @@ static void mingwProbe(Settings *settings, QList<Profile> &profiles)
return;
}
+ QByteArray architecture = gccMachineName.split('-').first();
+ if (architecture == "mingw32")
+ architecture = "x86";
+ else if (architecture == "mingw64")
+ architecture = "x86_64";
Profile profile(QString::fromLocal8Bit(gccMachineName), settings);
qbsInfo() << Tr::tr("Platform '%1' detected in '%2'.").arg(profile.name(), mingwPath);
@@ -210,6 +215,8 @@ static void mingwProbe(Settings *settings, QList<Profile> &profiles)
profile.setValue("cpp.toolchainInstallPath", mingwBinPath);
profile.setValue("cpp.compilerName", QLatin1String("g++.exe"));
profile.setValue("qbs.toolchain", QStringList() << "mingw" << "gcc");
+ profile.setValue(QLatin1String("qbs.architecture"),
+ HostOsInfo::canonicalArchitecture(QString::fromLatin1(architecture)));
profiles << profile;
}