diff --git a/examples/examples.pro b/examples/examples.pro
index 45621622ce5d9ab341e803cb946be97e3066c231..3d6872d554a13fa2d72f4d20e368d8d001bcd3a0 100644
--- a/examples/examples.pro
+++ b/examples/examples.pro
@@ -1,6 +1,8 @@
 TEMPLATE=subdirs
 
-SUBDIRS += webengine/quicknanobrowser
+qtHaveModule(webengine) {
+    SUBDIRS += webengine/quicknanobrowser
+}
 
 qtHaveModule(webenginewidgets) {
     SUBDIRS += \
diff --git a/src/src.pro b/src/src.pro
index ed402c5824d8e3332c59f33e24c39cdf33421683..5b31a22f86d28b875e5e8561abb2b3f191e6402b 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -1,26 +1,30 @@
 TEMPLATE = subdirs
 
-process.depends = core
-webengine.depends = core
-webenginewidgets.depends = core webengine
-webengine_plugin.subdir = webengine/plugin
-webengine_plugin.target = sub-webengine-plugin
-webengine_plugin.depends = webengine
-webengine_experimental_plugin.subdir = webengine/plugin/experimental
-webengine_experimental_plugin.target = sub-webengine-experimental-plugin
-webengine_experimental_plugin.depends = webengine
+isPlatformSupported() {
+    process.depends = core
+    webengine.depends = core
+    webenginewidgets.depends = core webengine
+    webengine_plugin.subdir = webengine/plugin
+    webengine_plugin.target = sub-webengine-plugin
+    webengine_plugin.depends = webengine
+    webengine_experimental_plugin.subdir = webengine/plugin/experimental
+    webengine_experimental_plugin.target = sub-webengine-experimental-plugin
+    webengine_experimental_plugin.depends = webengine
 
 
-SUBDIRS += core \
-           process \
-           webengine \
-           webengine_plugin \
-           webengine_experimental_plugin
+    SUBDIRS += core \
+               process \
+               webengine \
+               webengine_plugin \
+               webengine_experimental_plugin
 
-# FIXME: We probably want a bit more control over config options to tweak what to build/ship or not.
-# Another example of where this could be necessary is to make it easy to build proprietery codecs support.
-!contains(WEBENGINE_CONFIG, no_ui_delegates): SUBDIRS += webengine/ui
+    # FIXME: We probably want a bit more control over config options to tweak what to build/ship or not.
+    # Another example of where this could be necessary is to make it easy to build proprietery codecs support.
+    !contains(WEBENGINE_CONFIG, no_ui_delegates): SUBDIRS += webengine/ui
 
-qtHaveModule(widgets) {
-    SUBDIRS += webenginewidgets
+    qtHaveModule(widgets) {
+        SUBDIRS += webenginewidgets
+    }
+} else {
+    warning("QtWebEngine is not maintained on this platform and is therefore disabled.")
 }
diff --git a/tests/tests.pro b/tests/tests.pro
index 2144a15e3d311ce74bf50d485d1b06f2c8e1849e..f6dec7a559b9bd445bd1eb8cf8c4d9bbc76746e2 100644
--- a/tests/tests.pro
+++ b/tests/tests.pro
@@ -1,3 +1,5 @@
 TEMPLATE = subdirs
-SUBDIRS +=  auto quicktestbrowser
 
+isPlatformSupported() {
+    SUBDIRS +=  auto quicktestbrowser
+}
diff --git a/tools/qmake/mkspecs/features/functions.prf b/tools/qmake/mkspecs/features/functions.prf
index 4dcd8ed18751455c56902161213c4a9512b5bacd..a4dbb6732a36e3509d330da5386cd9ee44326ee5 100644
--- a/tools/qmake/mkspecs/features/functions.prf
+++ b/tools/qmake/mkspecs/features/functions.prf
@@ -1,3 +1,8 @@
+defineTest(isPlatformSupported) {
+  linux-g++|win32-msvc2013|macx-clang: return(true)
+  return(false)
+}
+
 # Map to the correct target type for gyp
 defineReplace(toGypTargetType) {
   equals(TEMPLATE, "app"):return("executable")