qmake: Introduce CE_PLATFORMNAME to fix creation of vcxproj files
While previous SDKs used the form "CE_SDK (CE_ARCH)" in their configuration/platform names, this is not true fo the Toradex SDK. Inside Visual Studio the platform is only called "Toradex_CE800" instead of "Toradex_CE800 (ARMV7)". In order not to break other SDKs CE_PLATFORMNAME is introduced and used in the wince80colibri-armv7-msvc2012 mkspec. If the variable is set qmake uses it as the platform name in its vcproj generator. Change-Id: Icb501bf6446a9f617745a0d2c7a80b240680b043 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
This commit is contained in:
parent
27425e62c0
commit
f095ff85c5
@ -7,6 +7,7 @@ include(../common/wince/qmake.conf)
|
||||
|
||||
CE_SDK = Toradex_CE800 # replace with actual SDK name
|
||||
CE_ARCH = ARMV7
|
||||
CE_PLATFORMNAME = Toradex_CE800
|
||||
QT_CONFIG -= accessibility
|
||||
|
||||
DEFINES += QT_NO_CLIPBOARD QT_NO_ACCESSIBILITY QT_NO_NATIVE_GESTURES QT_NOSTANDARDSHELL_UI_MODEL _CRT_SECURE_NO_DEPRECATE _WIN32_WCE=0x800 $$CE_ARCH _AMRV7_ armv7 _ARM_ UNDER_CE WINCE ARM QT_NO_WINCE_SHELLSDK QT_NO_WINCE_NUIOUSER
|
||||
|
@ -707,6 +707,8 @@ void VcprojGenerator::writeSubDirs(QTextStream &t)
|
||||
QString slnConf = _slnSolutionConf;
|
||||
if (!project->isEmpty("VCPROJ_ARCH")) {
|
||||
slnConf.replace(QLatin1String("|Win32"), "|" + project->first("VCPROJ_ARCH"));
|
||||
} else if (!project->isEmpty("CE_PLATFORMNAME")) {
|
||||
slnConf.replace(QLatin1String("|Win32"), "|" + project->first("CE_PLATFORMNAME"));
|
||||
} else if (!project->isEmpty("CE_SDK") && !project->isEmpty("CE_ARCH")) {
|
||||
QString slnPlatform = QString("|") + project->values("CE_SDK").join(' ') + " (" + project->first("CE_ARCH") + ")";
|
||||
slnConf.replace(QLatin1String("|Win32"), slnPlatform);
|
||||
@ -724,6 +726,8 @@ void VcprojGenerator::writeSubDirs(QTextStream &t)
|
||||
QString xplatform = platform;
|
||||
if (!project->isEmpty("VCPROJ_ARCH")) {
|
||||
xplatform = project->first("VCPROJ_ARCH").toQString();
|
||||
} else if (!project->isEmpty("CE_PLATFORMNAME")) {
|
||||
xplatform = project->first("CE_PLATFORMNAME").toQString();
|
||||
} else if (!project->isEmpty("CE_SDK") && !project->isEmpty("CE_ARCH")) {
|
||||
xplatform = project->values("CE_SDK").join(' ') + " (" + project->first("CE_ARCH") + ")";
|
||||
}
|
||||
@ -985,6 +989,8 @@ void VcprojGenerator::initProject()
|
||||
vcProject.Keyword = project->first("VCPROJ_KEYWORD").toQString();
|
||||
if (!project->isEmpty("VCPROJ_ARCH")) {
|
||||
vcProject.PlatformName = project->first("VCPROJ_ARCH").toQString();
|
||||
} else if (!project->isEmpty("CE_PLATFORMNAME")) {
|
||||
vcProject.PlatformName = project->first("CE_PLATFORMNAME").toQString();
|
||||
} else if (project->isHostBuild() || project->isEmpty("CE_SDK") || project->isEmpty("CE_ARCH")) {
|
||||
vcProject.PlatformName = (is64Bit ? "x64" : "Win32");
|
||||
} else {
|
||||
@ -1069,6 +1075,8 @@ void VcprojGenerator::initConfiguration()
|
||||
conf.ConfigurationName = conf.Name;
|
||||
if (!project->isEmpty("VCPROJ_ARCH")) {
|
||||
conf.Name += "|" + project->first("VCPROJ_ARCH");
|
||||
} else if (!project->isEmpty("CE_PLATFORMNAME")) {
|
||||
conf.Name += "|" + project->first("CE_PLATFORMNAME");
|
||||
} else if (project->isHostBuild() || project->isEmpty("CE_SDK") || project->isEmpty("CE_ARCH")) {
|
||||
conf.Name += (is64Bit ? "|x64" : "|Win32");
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user