1
# -------------------------------------------------------------------
2
# This feature enables the use of AllInOne.cpp files by adding them
3
# to SOURCES and removing the sources the corresponding files include
4
# from SOURCES, to avoid duplicated compilation units.
6
# See 'Tools/qmake/README' for an overview of the build system
7
# -------------------------------------------------------------------
9
# Globbing all does not work yet, not all AllInOne files build reliably yet.
10
# So instead we select them manually.
11
#collection = $$files($$_PRO_FILE_PWD_/*AllInOne.cpp, true)
12
collection = $$ALL_IN_ONE_SOURCES
14
for(collectionFile, collection) {
15
lines = $$cat($$_PRO_FILE_PWD_/$$collectionFile, lines)
17
line = $$find(line, "^.+include \"(.*)\"")
19
line ~= s/^.+include \"(.*)\"/\\1/
20
source = $$dirname(collectionFile)/$$line
21
contains(SOURCES, $$source) {
23
tookFromSources = true
26
!isEmpty(tookFromSources): SOURCES *= $$collectionFile