diff options
author | Jochen Seemann <seemann.jochen@gmail.com> | 2015-01-19 11:49:06 +0100 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> | 2015-02-05 14:27:25 +0000 |
commit | 9e6190cff3f78428eb4bedbb3f267f3d7a43f469 (patch) | |
tree | 834e0c484d758d33e818d58d28f6f27c8b6486d9 /tools | |
parent | 49af548abb03743eabb8727ac685e1c290cb2118 (diff) |
improve support for cross-compilation to not directly supported platforms
This adds a fallback platform OTHER to the platform-enum, which
applies when -xplatform is set to an unsupported target, e.g. Linux.
Without it, it would fall back to WINDOWS, with the consequence
that logic like platform() != WINDOWS would break a proper
configuration of Qt.
Change-Id: Ie34522e23e375da6c24f66b3410638f85724a0f9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/configure/configureapp.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index fbf25174f6..dcbe52b1cf 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -64,7 +64,8 @@ enum Platforms { WINDOWS_RT, QNX, BLACKBERRY, - ANDROID + ANDROID, + OTHER }; std::ostream &operator<<(std::ostream &s, const QString &val) { @@ -4494,6 +4495,8 @@ QString Configure::platformName() const return QStringLiteral("Qt for Blackberry"); case ANDROID: return QStringLiteral("Qt for Android"); + case OTHER: + return QStringLiteral("Qt for ???"); } } @@ -4512,6 +4515,8 @@ QString Configure::qpaPlatformName() const return QStringLiteral("blackberry"); case ANDROID: return QStringLiteral("android"); + case OTHER: + return QStringLiteral("xcb"); } } @@ -4535,6 +4540,9 @@ int Configure::platform() const if (xQMakeSpec.contains("android")) return ANDROID; + if (!xQMakeSpec.isEmpty()) + return OTHER; + return WINDOWS; } |