diff options
author | Liang Qi <liang.qi@qt.io> | 2016-11-23 07:12:07 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-11-23 09:24:36 +0100 |
commit | 38c1057f696c4e3f168305091413428d99007c43 (patch) | |
tree | 49c3ef009cc723151298bfc9eef85bb6fa5910be /qmake | |
parent | 48d7db6b3119ee27d9ae6b1bd0fdb24333f44756 (diff) | |
parent | e2b856d56290e9b3eaaf889b3e0a08badbaa6046 (diff) |
Merge remote-tracking branch 'origin/5.6' into 5.7
This also reverts commit 0d2f0164f45cb626c40a7c95026ba00fa56ac249.
Conflicts:
header.BSD-NEW
qmake/Makefile.win32
src/openglextensions/qopenglextensions.cpp
src/openglextensions/qopenglextensions.h
src/winmain/qtmain_win.cpp
src/winmain/qtmain_winrt.cpp
tools/configure/configureapp.cpp
util/glgen/qopenglextensions.cpp.header
util/glgen/qopenglextensions.h.header
Change-Id: If26c6f4111b342378dd88bbdc657e322d2ab6ad8
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/Makefile.win32 | 2 | ||||
-rw-r--r-- | qmake/doc/src/qmake-manual.qdoc | 6 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_objectmodel.h | 3 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_vcproj.cpp | 11 | ||||
-rw-r--r-- | qmake/library/qmakeevaluator.cpp | 13 |
5 files changed, 32 insertions, 3 deletions
diff --git a/qmake/Makefile.win32 b/qmake/Makefile.win32 index 834065ee61..1e28f3ec32 100644 --- a/qmake/Makefile.win32 +++ b/qmake/Makefile.win32 @@ -25,7 +25,7 @@ LINKER = link CFLAGS_EXTRA = /Zc:wchar_t- ! elseif "$(QMAKESPEC)" == "win32-msvc2008" || "$(QMAKESPEC)" == "win32-msvc2010" || "$(QMAKESPEC)" == "win32-msvc2012" || "$(QMAKESPEC)" == "win32-msvc2013" CFLAGS_EXTRA = /MP /D_CRT_SECURE_NO_WARNINGS /D_SCL_SECURE_NO_WARNINGS $(CFLAGS_CRT) -! elseif "$(QMAKESPEC)" == "win32-msvc2015" || "$(QMAKESPEC)" == "win32-clang-msvc2015" +! elseif "$(QMAKESPEC)" == "win32-msvc2015" || "$(QMAKESPEC)" == "win32-msvc2017" || "$(QMAKESPEC)" == "win32-clang-msvc2015" CFLAGS_EXTRA = /MP /D_CRT_SECURE_NO_WARNINGS /D_SCL_SECURE_NO_WARNINGS /Zc:strictStrings /w44456 /w44457 /w44458 /wd4577 $(CFLAGS_CRT) ! else ! error Unsupported compiler for this Makefile diff --git a/qmake/doc/src/qmake-manual.qdoc b/qmake/doc/src/qmake-manual.qdoc index 5c17f895e3..c0f03018c0 100644 --- a/qmake/doc/src/qmake-manual.qdoc +++ b/qmake/doc/src/qmake-manual.qdoc @@ -2057,6 +2057,12 @@ value of this variable is typically handled by qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. + \section1 QMAKE_OBJECTIVE_CFLAGS + + Specifies the Objective C/C++ compiler flags for building + a project. These flags are used in addition to QMAKE_CFLAGS and + QMAKE_CXXFLAGS. + \section1 QMAKE_POST_LINK Specifies the command to execute after linking the \l{TARGET} diff --git a/qmake/generators/win32/msvc_objectmodel.h b/qmake/generators/win32/msvc_objectmodel.h index 9f9c8027c9..7f9d38a411 100644 --- a/qmake/generators/win32/msvc_objectmodel.h +++ b/qmake/generators/win32/msvc_objectmodel.h @@ -52,7 +52,8 @@ enum DotNET { NET2010 = 0xa0, NET2012 = 0xb0, NET2013 = 0xc0, - NET2015 = 0xd0 + NET2015 = 0xd0, + NET2017 = 0xe0 }; /* diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp index 7a713e1b65..19e35e798f 100644 --- a/qmake/generators/win32/msvc_vcproj.cpp +++ b/qmake/generators/win32/msvc_vcproj.cpp @@ -65,6 +65,7 @@ struct DotNetCombo { const char *versionStr; const char *regKey; } dotNetCombo[] = { + {NET2017, "MSVC.NET 2017 (15.0)", "Software\\Microsoft\\VisualStudio\\SxS\\VS7\\15.0"}, {NET2015, "MSVC.NET 2015 (14.0)", "Software\\Microsoft\\VisualStudio\\14.0\\Setup\\VC\\ProductDir"}, {NET2013, "MSVC.NET 2013 (12.0)", "Software\\Microsoft\\VisualStudio\\12.0\\Setup\\VC\\ProductDir"}, {NET2013, "MSVC.NET 2013 Express Edition (12.0)", "Software\\Microsoft\\VCExpress\\12.0\\Setup\\VC\\ProductDir"}, @@ -159,6 +160,8 @@ const char _slnHeader120[] = "Microsoft Visual Studio Solution File, Format "\n# Visual Studio 2013"; const char _slnHeader140[] = "Microsoft Visual Studio Solution File, Format Version 12.00" "\n# Visual Studio 2015"; +const char _slnHeader141[] = "Microsoft Visual Studio Solution File, Format Version 12.00" + "\n# Visual Studio 2017"; // The following UUID _may_ change for later servicepacks... // If so we need to search through the registry at // HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.0\Projects @@ -389,6 +392,8 @@ QString VcprojGenerator::retrievePlatformToolSet() const return QStringLiteral("v120") + suffix; case NET2015: return QStringLiteral("v140") + suffix; + case NET2017: + return QStringLiteral("v141") + suffix; default: return QString(); } @@ -615,6 +620,9 @@ void VcprojGenerator::writeSubDirs(QTextStream &t) } switch (which_dotnet_version(project->first("MSVC_VER").toLatin1())) { + case NET2017: + t << _slnHeader141; + break; case NET2015: t << _slnHeader140; break; @@ -945,6 +953,9 @@ void VcprojGenerator::initProject() // Own elements ----------------------------- vcProject.Name = project->first("QMAKE_ORIG_TARGET").toQString(); switch (which_dotnet_version(project->first("MSVC_VER").toLatin1())) { + case NET2017: + vcProject.Version = "15.00"; + break; case NET2015: vcProject.Version = "14.00"; break; diff --git a/qmake/library/qmakeevaluator.cpp b/qmake/library/qmakeevaluator.cpp index e828dd85f7..dcbf16b3ea 100644 --- a/qmake/library/qmakeevaluator.cpp +++ b/qmake/library/qmakeevaluator.cpp @@ -971,6 +971,13 @@ static ProString msvcBinDirToQMakeArch(QString subdir) subdir = subdir.toLower(); if (subdir == QLatin1String("amd64")) return ProString("x86_64"); + // Since 2017 the folder structure from here is HostX64|X86/x64|x86 + idx = subdir.indexOf(QLatin1Char('\\')); + if (idx == -1) + return ProString("x86"); + subdir.remove(0, idx + 1); + if (subdir == QLatin1String("x64")) + return ProString("x86_64"); return ProString(subdir); } @@ -1065,8 +1072,12 @@ void QMakeEvaluator::loadDefaults() vars[ProKey("QMAKE_HOST.arch")] << archStr; # if defined(Q_CC_MSVC) // ### bogus condition, but nobody x-builds for msvc with a different qmake + // Since VS 2017 we need VCToolsInstallDir instead of VCINSTALLDIR + QString vcInstallDir = m_option->getEnv(QLatin1String("VCToolsInstallDir")); + if (vcInstallDir.isEmpty()) + vcInstallDir = m_option->getEnv(QLatin1String("VCINSTALLDIR")); vars[ProKey("QMAKE_TARGET.arch")] = msvcArchitecture( - m_option->getEnv(QLatin1String("VCINSTALLDIR")), + vcInstallDir, m_option->getEnv(QLatin1String("PATH"))); # endif #elif defined(Q_OS_UNIX) |