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>
This commit is contained in:
parent
49af548abb
commit
9e6190cff3
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user