diff options
author | Kai Koehne <kai.koehne@theqtcompany.com> | 2015-08-03 14:47:56 +0200 |
---|---|---|
committer | Kai Koehne <kai.koehne@theqtcompany.com> | 2015-08-03 14:36:53 +0000 |
commit | 853d5867644fd53f2d779c3c7b39a34803a3e566 (patch) | |
tree | 22777a970faccc2e5ac54f3d5966084af04b711f | |
parent | 5e3d8ee079aac41e06c4fea1264aaf57988827ee (diff) |
Select Visual Studio version based on mkspec
Change 7a1e0d57d1a1683442 determined the Visual Studio version based
on the 'VisualStudioVersion' environment variable. While this variable
is defined by the default Visual Studio command line prompt, it isn't
necessarily set in other environments.
Anyhow, Qt already determined the compiler/Visual Studio version in the
mkspec. We can just reuse this here.
Change-Id: Ibee9526e91ae855151940da6be438705de048c0c
Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
-rw-r--r-- | src/core/config/windows.pri | 14 | ||||
-rwxr-xr-x | tools/buildscripts/gyp_qtwebengine | 6 |
2 files changed, 14 insertions, 6 deletions
diff --git a/src/core/config/windows.pri b/src/core/config/windows.pri index f7644c83b..602afbc67 100644 --- a/src/core/config/windows.pri +++ b/src/core/config/windows.pri @@ -28,3 +28,17 @@ contains(QT_CONFIG, angle) { GYP_ARGS += "-D qt_gl=\"opengl\"" } +msvc { + equals(MSVC_VER, 12.0) { + MSVS_VERSION = 2013 + } else:equals(MSVC_VER, 14.0) { + MSVS_VERSION = 2015 + } else { + fatal("Visual Studio compiler version \"$$MSVC_VER\" is not supported by Qt WebEngine") + } + + GYP_ARGS += "-G msvs_version=$$MSVS_VERSION" + +} else { + fatal("Qt WebEngine for Windows can only be built with the Microsoft Visual Studio C++ compiler") +} diff --git a/tools/buildscripts/gyp_qtwebengine b/tools/buildscripts/gyp_qtwebengine index 1fc7ab7a9..116f8f2bd 100755 --- a/tools/buildscripts/gyp_qtwebengine +++ b/tools/buildscripts/gyp_qtwebengine @@ -25,12 +25,6 @@ if sys.platform in ('cygwin', 'win32'): if os.path.isdir(gnuwin_tools_dir): os.environ['PATH'] = gnuwin_tools_dir + os.pathsep + os.environ['PATH'] -if 'VisualStudioVersion' in os.environ: - if os.environ['VisualStudioVersion'] == '12.0': - os.environ['GYP_MSVS_VERSION'] = '2013' - elif os.environ['VisualStudioVersion'] == '14.0': - os.environ['GYP_MSVS_VERSION'] = '2015' - sys.path.insert(1, script_dir) import gyp_helper sys.path.insert(1, os.path.join(chrome_src, 'tools', 'gyp', 'pylib')) |