From eb5569186b126e7ffc507a14efd502fac32f7fb9 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Wed, 25 Jan 2017 09:16:41 +0100 Subject: 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 --- tools/qmake/mkspecs/features/functions.prf | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tools/qmake') 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) -- cgit v1.2.3