diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-11-13 01:00:13 +0100 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-11-13 01:00:13 +0100 |
commit | 0441d959ff87431ab432ce0c30bbb857a631742e (patch) | |
tree | 25c6c4293f74e39b9d4cf45b15957f233cffa9c5 /qmake | |
parent | ae0dd3201bc13b81c62752bb04e42362c78bfe16 (diff) | |
parent | 8c685b765bf4ceba3c4cf8fdd9c9d680f338b7a9 (diff) |
Merge remote-tracking branch 'origin/5.12' into dev
Change-Id: I5dbdc13c6133e5b03e362c5461b4a599d781bd1e
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/generators/win32/msvc_nmake.cpp | 46 |
1 files changed, 34 insertions, 12 deletions
diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp index f2cd7c633b..306ae57871 100644 --- a/qmake/generators/win32/msvc_nmake.cpp +++ b/qmake/generators/win32/msvc_nmake.cpp @@ -71,18 +71,28 @@ NmakeMakefileGenerator::writeMakefile(QTextStream &t) return MakefileGenerator::writeStubMakefile(t); #endif if (!project->isHostBuild()) { + const QString msvcVer = project->first("MSVC_VER").toQString(); + if (msvcVer.isEmpty()) { + fprintf(stderr, "Mkspec does not specify MSVC_VER. Cannot continue.\n"); + return false; + } + + bool winrtBuild = false; + bool crossPlatformDesktopBuild = false; + QString arch = project->first("VCPROJ_ARCH").toQString().toLower(); if (project->isActiveConfig(QStringLiteral("winrt"))) { - QString arch = project->first("VCPROJ_ARCH").toQString().toLower(); + winrtBuild = true; + + // Only add explicit support for arm64 cross-platform desktop builds. + } else if ((arch == QLatin1String("arm64")) && (msvcVer == QStringLiteral("15.0"))) { + crossPlatformDesktopBuild = true; + } + + if (winrtBuild || crossPlatformDesktopBuild) { QString compiler; QString compilerArch; - const QString msvcVer = project->first("MSVC_VER").toQString(); - if (msvcVer.isEmpty()) { - fprintf(stderr, "Mkspec does not specify MSVC_VER. Cannot continue.\n"); - return false; - } - + const ProStringList hostArch = project->values("QMAKE_TARGET.arch"); if (msvcVer == QStringLiteral("15.0")) { - const ProStringList hostArch = project->values("QMAKE_TARGET.arch"); if (hostArch.contains("x86_64")) compiler = QStringLiteral("HostX64/"); else @@ -93,6 +103,9 @@ NmakeMakefileGenerator::writeMakefile(QTextStream &t) } else if (arch == QLatin1String("x64")) { compiler += QStringLiteral("x64"); compilerArch = QStringLiteral("amd64"); + } else if (arch == QLatin1String("arm64")) { + compiler += QStringLiteral("arm64"); + compilerArch = QStringLiteral("arm64"); } else { arch = QStringLiteral("x86"); compiler += QStringLiteral("x86"); @@ -119,7 +132,7 @@ NmakeMakefileGenerator::writeMakefile(QTextStream &t) return false; } const QString targetVer = project->first("WINTARGET_VER").toQString(); - if (targetVer.isEmpty()) { + if (targetVer.isEmpty() && winrtBuild) { fprintf(stderr, "Mkspec does not specify WINTARGET_VER. Cannot continue.\n"); return false; } @@ -181,10 +194,19 @@ NmakeMakefileGenerator::writeMakefile(QTextStream &t) incDirs << crtInclude + QStringLiteral("/shared"); incDirs << crtInclude + QStringLiteral("/winrt"); - incDirs << kitDir + QStringLiteral("Extension SDKs/WindowsMobile/") - + crtVersion + QStringLiteral("/Include/WinRT"); + if (winrtBuild) { + // Only use mobile-specific headers and link against store-specific libs for + // winrt builds. + incDirs << kitDir + QStringLiteral("Extension SDKs/WindowsMobile/") + + crtVersion + QStringLiteral("/Include/WinRT"); - libDirs << toolsInstallDir + QStringLiteral("lib/") + arch + QStringLiteral("/store"); + libDirs << toolsInstallDir + QStringLiteral("lib/") + arch + QStringLiteral("/store"); + } else { + // Desktop projects may require the atl headers and libs. + incDirs << toolsInstallDir + QStringLiteral("atlmfc/include"); + libDirs << toolsInstallDir + QStringLiteral("atlmfc/lib/") + compilerArch; + libDirs << toolsInstallDir + QStringLiteral("lib/") + arch; + } libDirs << vcInstallDir + QStringLiteral("VC/Auxiliary/VS/lib/") + arch; |