From f1fd824ebb843d6ca82f2ecdf14eb0112bf2df5e Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 26 Apr 2013 11:59:56 +0200 Subject: [PATCH] make src/ subdir optional there is at least one examples-only repo (qtwebkit-examples). we look for tools/ only when src/ is also present, based on the assumption that if there was only tools/, it would be actually named src/ (like in qttools). the split between the two is nowadays arbitrary anyway. Change-Id: I982b1d0e26dd7d0a5de751546099a58f86390124 Reviewed-by: Joerg Bornemann --- mkspecs/features/qt_parts.prf | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/mkspecs/features/qt_parts.prf b/mkspecs/features/qt_parts.prf index cf59ed6e0e..ed028d59d3 100644 --- a/mkspecs/features/qt_parts.prf +++ b/mkspecs/features/qt_parts.prf @@ -19,22 +19,24 @@ TEMPLATE = subdirs bp = $$eval($$upper($$TARGET)_BUILD_PARTS) !isEmpty(bp): QT_BUILD_PARTS = $$bp -sub_src.subdir = src -sub_src.target = sub-src -SUBDIRS = sub_src +exists($$_PRO_FILE_PWD_/src/src.pro) { + sub_src.subdir = src + sub_src.target = sub-src + SUBDIRS += sub_src -exists($$_PRO_FILE_PWD_/tools/tools.pro) { - sub_tools.subdir = tools - sub_tools.target = sub-tools - sub_tools.depends = sub_src - # conditional treatment happens on a case-by-case basis - SUBDIRS += sub_tools + exists($$_PRO_FILE_PWD_/tools/tools.pro) { + sub_tools.subdir = tools + sub_tools.target = sub-tools + sub_tools.depends = sub_src + # conditional treatment happens on a case-by-case basis + SUBDIRS += sub_tools + } } exists($$_PRO_FILE_PWD_/examples/examples.pro) { sub_examples.subdir = examples sub_examples.target = sub-examples - sub_examples.depends = sub_src + contains(SUBDIRS, sub_src): sub_examples.depends = sub_src examples_need_tools: sub_examples.depends += sub_tools !contains(QT_BUILD_PARTS, examples): sub_examples.CONFIG = no_default_target no_default_install SUBDIRS += sub_examples @@ -44,7 +46,7 @@ exists($$_PRO_FILE_PWD_/examples/examples.pro) { exists($$_PRO_FILE_PWD_/demos/demos.pro) { sub_demos.subdir = demos sub_demos.target = sub-demos - sub_demos.depends = sub_src + contains(SUBDIRS, sub_src): sub_demos.depends = sub_src examples_need_tools: sub_demos.depends += sub_tools !contains(QT_BUILD_PARTS, examples): sub_demos.CONFIG = no_default_target no_default_install SUBDIRS += sub_demos @@ -53,7 +55,7 @@ exists($$_PRO_FILE_PWD_/demos/demos.pro) { exists($$_PRO_FILE_PWD_/tests/tests.pro) { sub_tests.subdir = tests sub_tests.target = sub-tests - sub_tests.depends = sub_src # The tests may have a run-time only dependency on other parts + contains(SUBDIRS, sub_src): sub_tests.depends = sub_src # The tests may have a run-time only dependency on other parts tests_need_tools: sub_tests.depends += sub_tools sub_tests.CONFIG = no_default_install !contains(QT_BUILD_PARTS, tests) {