From b1738d63298ef1850995d13e9f7c8bcc6156edc1 Mon Sep 17 00:00:00 2001
From: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
Date: Wed, 2 Sep 2015 13:51:35 +0200
Subject: [PATCH] WinRT: Display error message when configuring with -no-opengl

-no-opengl is not a supported option when compiling for WinRT or Windows
Phone. Hence bail out early to avoid compilation errors at later stage.

Task-number: QTBUG-48041
Change-Id: I449b8935b95f0b75139a0f7bfa13256ea3fe95e5
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
---
 tools/configure/configureapp.cpp | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index ab4e091d6b2..99cc69eb5fc 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -2677,6 +2677,14 @@ bool Configure::verifyConfiguration()
         }
     }
 
+    if (dictionary["OPENGL"] == "no" || dictionary["OPENGL_ES_2"] == "no") {
+        if (dictionary.value("XQMAKESPEC").startsWith("winphone") ||
+                dictionary.value("XQMAKESPEC").startsWith("winrt")) {
+            cout << "ERROR: Option -no-opengl is not valid for WinRT." << endl;
+            dictionary[ "DONE" ] = "error";
+        }
+    }
+
     if (prompt)
         promptKeyPress();
 
-- 
GitLab