install a sane top-level examples.pro file
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>
Mon, 10 Dec 2012 18:29:33 +0000 (19:29 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 11 Dec 2012 12:37:57 +0000 (13:37 +0100)
generally, don't install anything from the top-level examples dirs
automatically. the global README and the aggregator examples.pro are
installed explicitly.

Change-Id: I5f6b8760f37d917b800fa85979896a471778cac0
Reviewed-by: hjk <qthjk@ovi.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
examples/aggregate/examples.pro [new file with mode: 0644]
examples/examples.pro
mkspecs/features/qt_example_installs.prf

diff --git a/examples/aggregate/examples.pro b/examples/aggregate/examples.pro
new file mode 100644 (file)
index 0000000..bf5e48f
--- /dev/null
@@ -0,0 +1,6 @@
+TEMPLATE = subdirs
+
+sd = $$files(*)
+for(d, sd): \
+    exists($$d/$${d}.pro): \
+        SUBDIRS += $$d
index db444b5..06ef0ad 100644 (file)
@@ -25,3 +25,9 @@ contains(QT_CONFIG, opengl):!contains(QT_CONFIG, no-widgets):SUBDIRS += opengl
 contains(QT_CONFIG, dbus): SUBDIRS += dbus
 contains(QT_CONFIG, concurrent): SUBDIRS += qtconcurrent
 contains(DEFINES, QT_NO_TRANSLATION): SUBDIRS -= linguist
+
+aggregate.files = aggregate/examples.pro
+aggregate.path = $$[QT_INSTALL_EXAMPLES]
+readme.files = README
+readme.path = $$[QT_INSTALL_EXAMPLES]
+INSTALLS += aggregate readme
index 281552a..de1176e 100644 (file)
@@ -1,5 +1,5 @@
 probase = $$relative_path($$_PRO_FILE_PWD_, $$dirname(_QMAKE_CONF_)/examples)
-!contains(probase, ^\\..*) {
+!isEmpty(probase):!contains(probase, ^\\..*) {
     for(ex, EXAMPLE_FILES): \
         sourcefiles += $$files($$absolute_path($$ex, $$_PRO_FILE_PWD_))
     for(res, RESOURCES) {