diff options
author | Kai Koehne <kai.koehne@qt.io> | 2017-01-25 09:16:41 +0100 |
---|---|---|
committer | Kai Koehne <kai.koehne@qt.io> | 2017-01-25 13:53:09 +0000 |
commit | eb5569186b126e7ffc507a14efd502fac32f7fb9 (patch) | |
tree | b89b5d6b3c4a000d9202d678cb971d85ffc5876e /tools | |
parent | 349ef9870917e8cf2c189fed4a970023b19ba24a (diff) |
Enforce check for minimal Windows SDK version
Skip build if WindowsSDKVersion environment variable is not set at all
(e.g. if vcvarsall has not been called), or if it is is set to "\"
- this can happen if vcvarsall.bat did not find a Windows SDK.
Task-number: QTBUG-58363
Change-Id: Ieb73986a26d0b8fa28a8caa7702b830f4fb4b216
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qmake/mkspecs/features/functions.prf | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/qmake/mkspecs/features/functions.prf b/tools/qmake/mkspecs/features/functions.prf index 236ee8ac5..52bb5ec00 100644 --- a/tools/qmake/mkspecs/features/functions.prf +++ b/tools/qmake/mkspecs/features/functions.prf @@ -260,6 +260,11 @@ defineTest(isMinWinSDKVersion) { requested_minor = $$2 WIN_SDK_VERSION = $$(WindowsSDKVersion) + isEmpty(WIN_SDK_VERSION)|equals(WIN_SDK_VERSION, "\\") { + skipBuild("Could not detect Windows SDK version (\'WindowsSDKVersion\' environment variable is not set).") + return(false) + } + # major.0.minor major_version = $$section(WIN_SDK_VERSION, ., 0, 0) minor_version = $$section(WIN_SDK_VERSION, ., 2, 2) |