diff options
Diffstat (limited to 'mkspecs/features/qt_functions.prf')
-rw-r--r-- | mkspecs/features/qt_functions.prf | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf index f614ad8f07..2d8f81bae1 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf @@ -267,3 +267,29 @@ defineTest(packagesExist) { return(true) } +# Prepares target that will iterate through all subdirs (except those +# with no_default_target or no_{name_of_target}_target. The prepared +# target must still be manually added to QMAKE_EXTRA_TARGETS. +defineTest(prepareRecursiveTarget) { + target = $$1 + no_$${target}_target: return() + + for(subdir, SUBDIRS) { + subdir_config = $$eval($${subdir}.CONFIG) + contains(subdir_config, no_default_target): next() + contains(subdir_config, no_$${target}_target): next() + + $${target}.recurse += $$subdir + } + + # Set up the recurse target only when there + # is something to recurse into. + isEmpty($${target}.recurse): return() + + $${target}.CONFIG = recursive + $${target}.recurse_target = $${target} + + export($${target}.recurse) + export($${target}.CONFIG) + export($${target}.recurse_target) +} |