From b8d0bde59c00471b915c8f876e16fda9fd5f435e Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 10 Dec 2012 19:29:33 +0100 Subject: [PATCH] install a sane top-level examples.pro file 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 Reviewed-by: Joerg Bornemann --- examples/aggregate/examples.pro | 6 ++++++ examples/examples.pro | 6 ++++++ mkspecs/features/qt_example_installs.prf | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 examples/aggregate/examples.pro diff --git a/examples/aggregate/examples.pro b/examples/aggregate/examples.pro new file mode 100644 index 0000000000..bf5e48fd59 --- /dev/null +++ b/examples/aggregate/examples.pro @@ -0,0 +1,6 @@ +TEMPLATE = subdirs + +sd = $$files(*) +for(d, sd): \ + exists($$d/$${d}.pro): \ + SUBDIRS += $$d diff --git a/examples/examples.pro b/examples/examples.pro index db444b5d12..06ef0adcab 100644 --- a/examples/examples.pro +++ b/examples/examples.pro @@ -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 diff --git a/mkspecs/features/qt_example_installs.prf b/mkspecs/features/qt_example_installs.prf index 281552acb6..de1176ef96 100644 --- a/mkspecs/features/qt_example_installs.prf +++ b/mkspecs/features/qt_example_installs.prf @@ -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) {