summaryrefslogtreecommitdiffstats
path: root/examples/examples.pro
diff options
context:
space:
mode:
authorLaszlo Papp <lpapp@kde.org>2012-07-11 05:47:52 +0100
committerDenis Shienkov <scapig@yandex.ru>2012-07-15 12:18:33 +0200
commit3fbc5a7fdc8f145c52edcd34784e212cf26cde27 (patch)
treee13513946d71f809cdd7a7d36d01526b3279ee92 /examples/examples.pro
parent5f5b7a16fec1afd8377eeeb4334e20d9ec24f906 (diff)
Build the UI examples only, if the QtWidgets module is present
This only works nicely with Qt5 because there is no simple way of achieving the "!isEmpty(QT.widgets.name)" feature with the previous major versions. In general, the recommendation is that to depend on modules in the examples that are also the dependency of the library itself. However, that can be an exception made with optional dependencies that the Qt Project accepts. Tested on Linux with Qt5, and this works fine. There were no regressions to the previous operations with Qt4 either. Change-Id: I0d86557bb2a49300bb3bfd0adb94b61b1e7d4cc3 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <scapig@yandex.ru>
Diffstat (limited to 'examples/examples.pro')
-rw-r--r--examples/examples.pro7
1 files changed, 6 insertions, 1 deletions
diff --git a/examples/examples.pro b/examples/examples.pro
index 76029a54..171e8ec3 100644
--- a/examples/examples.pro
+++ b/examples/examples.pro
@@ -1,3 +1,8 @@
TEMPLATE = subdirs
CONFIG += ordered
-SUBDIRS = terminal enumerator cenumerator
+SUBDIRS = cenumerator
+greaterThan(QT_MAJOR_VERSION, 4) {
+ !isEmpty(QT.widgets.name):SUBDIRS += enumerator terminal
+} else {
+ SUBDIRS += enumerator terminal
+}