summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorMaurice Kalinowski <maurice.kalinowski@theqtcompany.com>2015-08-04 08:18:01 +0200
committerMika Lindqvist <postmaster@raasu.org>2015-08-06 19:36:17 +0000
commitf43a2c20d3328b46abed42af379a0970d9404b54 (patch)
tree7f24ef4f94cbf94c6d435e440b0d74b515811cda /qmake
parent79ae2b3963f7356d4931de5fee67f2259ec7f6f9 (diff)
WinRT: Fix build for Windows 10
The SDK Version has been updated, hence include and lib directories were wrong. Luckily, Microsoft introduced an environment variable in the final VS2015 release to identify the location. Also has the benefit to reduce hardcoded paths. Change-Id: I9726db031d87d119bc7326154b24554c4b685d57 Reviewed-by: Andrew Knight <andrew.knight@intopalo.com> Reviewed-by: Mika Lindqvist <postmaster@raasu.org>
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/win32/msvc_nmake.cpp25
1 files changed, 15 insertions, 10 deletions
diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp
index aff8d9fcad..7646198da1 100644
--- a/qmake/generators/win32/msvc_nmake.cpp
+++ b/qmake/generators/win32/msvc_nmake.cpp
@@ -190,19 +190,24 @@ NmakeMakefileGenerator::writeMakefile(QTextStream &t)
incDirs << vcInstallDir + QStringLiteral("include");
incDirs << vcInstallDir + QStringLiteral("atlmfc/include");
- // ### Investigate why VS uses 10056 first
- incDirs << kitDir + QStringLiteral("Include/10.0.10056.0/ucrt");
- incDirs << kitDir + QStringLiteral("Include/10.0.10069.0/ucrt");
- incDirs << kitDir + QStringLiteral("Include/10.0.10069.0/um");
- incDirs << kitDir + QStringLiteral("Include/10.0.10069.0/shared");
- incDirs << kitDir + QStringLiteral("Include/10.0.10069.0/winrt");
+
+ const QString crtVersion = qgetenv("UCRTVersion");
+ if (crtVersion.isEmpty()) {
+ fprintf(stderr, "Failed to access CRT version.\n");
+ return false;
+ }
+ const QString crtInclude = kitDir + QStringLiteral("Include/") + crtVersion;
+ const QString crtLib = kitDir + QStringLiteral("Lib/") + crtVersion;
+ incDirs << crtInclude + QStringLiteral("/ucrt");
+ incDirs << crtInclude + QStringLiteral("/um");
+ incDirs << crtInclude + QStringLiteral("/shared");
+ incDirs << crtInclude + QStringLiteral("/winrt");
libDirs << vcInstallDir + QStringLiteral("lib/store/") + compilerArch;
libDirs << vcInstallDir + QStringLiteral("atlmfc/lib") + compilerArch;
- // ### Investigate why VS uses 10056 first
- libDirs << kitDir + QStringLiteral("lib/10.0.10056.0/ucrt/") + arch;
- libDirs << kitDir + QStringLiteral("lib/10.0.10069.0/ucrt/") + arch;
- libDirs << kitDir + QStringLiteral("lib/10.0.10069.0/um/") + arch;
+
+ libDirs << crtLib + QStringLiteral("/ucrt/") + arch;
+ libDirs << crtLib + QStringLiteral("/um/") + arch;
} else if (isPhone) {
QString sdkDir = vcInstallDir;
if (!QDir(sdkDir).exists()) {