From 918fd56324bbfb0d3e6bfffaaa608c64b62ef45b Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 3 Jul 2012 21:26:36 +0200 Subject: centralize handling of QT_BUILD_PARTS Change-Id: I33b8c3958a102d87461ad887fa5749bd9a6dc037 Reviewed-by: Sergio Ahumada Reviewed-by: Marius Storm-Olsen --- mkspecs/features/qt_parts.prf | 44 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 mkspecs/features/qt_parts.prf (limited to 'mkspecs/features/qt_parts.prf') diff --git a/mkspecs/features/qt_parts.prf b/mkspecs/features/qt_parts.prf new file mode 100644 index 0000000000..9257f5612f --- /dev/null +++ b/mkspecs/features/qt_parts.prf @@ -0,0 +1,44 @@ +load(qt_build_config) + +TEMPLATE = subdirs + +sub_src.subdir = src +sub_src.target = sub-src +SUBDIRS = sub_src + +exists(tools/tools.pro) { + sub_tools.subdir = tools + sub_tools.target = sub-tools + sub_tools.depends = sub_src + !contains(QT_BUILD_PARTS, tools): sub_tools.CONFIG = no_default_target no_default_install + SUBDIRS += sub_tools +} + +exists(examples/examples.pro) { + sub_examples.subdir = examples + sub_examples.target = sub-examples + sub_examples.depends = sub_src + !contains(QT_BUILD_PARTS, examples): sub_examples.CONFIG = no_default_target no_default_install + SUBDIRS += sub_examples +} + +# Some modules still have these +exists(demos/demos.pro) { + sub_demos.subdir = examples + sub_demos.target = sub-examples + sub_demos.depends = sub_src + !contains(QT_BUILD_PARTS, examples): sub_demos.CONFIG = no_default_target no_default_install + SUBDIRS += sub_demos +} + +exists(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 tools + sub_tests.CONFIG = no_default_install + !contains(QT_BUILD_PARTS, tests): sub_tests.CONFIG += no_default_target + SUBDIRS += sub_tests +} + +QT_BUILD_PARTS -= libs tools examples tests +!isEmpty(QT_BUILD_PARTS): warning("Unknown build part(s): $$QT_BUILD_PARTS") -- cgit v1.2.3