From 3fbc5a7fdc8f145c52edcd34784e212cf26cde27 Mon Sep 17 00:00:00 2001 From: Laszlo Papp Date: Wed, 11 Jul 2012 05:47:52 +0100 Subject: 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 Reviewed-by: Denis Shienkov --- examples/examples.pro | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 +} -- cgit v1.2.3