From c3ee845db74f540603aada8df7dccd680889f7bb Mon Sep 17 00:00:00 2001
From: Topi Reinio <topi.reinio@qt.io>
Date: Tue, 3 Jan 2017 11:07:18 +0100
Subject: [PATCH] Add .pro files for example subdirectories

Instead of adding individual example projects into SUBDIRS from the
top-level examples.pro, add a .pro file for both /examples/webengine
and /examples/webenginewidgets that handles them.

This way, it's easier to e.g. build all webengine examples from
binary packages, as the top-level examples.pro is not packaged.

Task-number: QTBUG-57124
Change-Id: I8cf8ac7b13b86306b31bc43c79e3d8272193b1d3
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
---
 examples/examples.pro                         | 26 ++-----------------
 examples/webengine/webengine.pro              |  6 +++++
 .../webenginewidgets/webenginewidgets.pro     | 17 ++++++++++++
 3 files changed, 25 insertions(+), 24 deletions(-)
 create mode 100644 examples/webengine/webengine.pro
 create mode 100644 examples/webenginewidgets/webenginewidgets.pro

diff --git a/examples/examples.pro b/examples/examples.pro
index 1a0f3a263..3dac9b0b7 100644
--- a/examples/examples.pro
+++ b/examples/examples.pro
@@ -1,27 +1,5 @@
 TEMPLATE=subdirs
 
-qtHaveModule(webengine) {
-    SUBDIRS += \
-        webengine/customdialogs \
-        webengine/minimal \
-        webengine/quicknanobrowser
-}
+qtHaveModule(webengine): SUBDIRS += webengine
 
-qtHaveModule(webenginewidgets) {
-    SUBDIRS += \
-        webenginewidgets/minimal \
-        webenginewidgets/contentmanipulation \
-        webenginewidgets/cookiebrowser \
-        webenginewidgets/demobrowser \
-        webenginewidgets/markdowneditor \
-        webenginewidgets/simplebrowser
-
-    contains(WEBENGINE_CONFIG, use_spellchecker):!cross_compile {
-        !contains(WEBENGINE_CONFIG, use_native_spellchecker) {
-            SUBDIRS += webenginewidgets/spellchecker
-        } else {
-            message("Spellcheck example will not be built because it depends on usage of Hunspell dictionaries.")
-        }
-    }
-
-}
+qtHaveModule(webenginewidgets): SUBDIRS += webenginewidgets
diff --git a/examples/webengine/webengine.pro b/examples/webengine/webengine.pro
new file mode 100644
index 000000000..969681e9d
--- /dev/null
+++ b/examples/webengine/webengine.pro
@@ -0,0 +1,6 @@
+TEMPLATE=subdirs
+
+SUBDIRS += \
+    customdialogs \
+    minimal \
+    quicknanobrowser
diff --git a/examples/webenginewidgets/webenginewidgets.pro b/examples/webenginewidgets/webenginewidgets.pro
new file mode 100644
index 000000000..353104d6a
--- /dev/null
+++ b/examples/webenginewidgets/webenginewidgets.pro
@@ -0,0 +1,17 @@
+TEMPLATE=subdirs
+
+SUBDIRS += \
+    minimal \
+    contentmanipulation \
+    cookiebrowser \
+    demobrowser \
+    markdowneditor \
+    simplebrowser
+
+contains(WEBENGINE_CONFIG, use_spellchecker):!cross_compile {
+    !contains(WEBENGINE_CONFIG, use_native_spellchecker) {
+        SUBDIRS += spellchecker
+    } else {
+        message("Spellcheck example will not be built because it depends on usage of Hunspell dictionaries.")
+    }
+}
-- 
GitLab