Skip to content

Commit eab4330

Browse files
committed
chore(qmake): add toggles to build only the generator or exclude it
Introduce two qmake CONFIG flags to control subdir builds: - CONFIG+=generator_only -> build just the wrapper generator - CONFIG+=exclude_generator -> build everything except the generator Default remains unchanged (all subdirs). This enables CI to generate wrappers first, then build without the generator to avoid redundant work.
1 parent 5a891f2 commit eab4330

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

PythonQt.pro

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,24 @@
11
TEMPLATE = subdirs
22

3-
SUBDIRS = generator src extensions tests examples
3+
# Define the full set of subdirectories, including the generator.
4+
# This list is used as the default build target.
5+
ALL_SUBDIRS = generator src extensions tests examples
6+
47
tests.depends += src extensions
58
extensions.depends += src
69
examples.depends += src extensions
10+
11+
# The 'generator_only' config can be used to override the default.
12+
CONFIG(generator_only) {
13+
# If the generator_only config is set, override the SUBDIRS list
14+
# to only include the generator.
15+
SUBDIRS = generator
16+
} else: CONFIG(exclude_generator) {
17+
# If the 'generator_only' option is not present, but 'exclude_generator' is,
18+
# then remove the generator from the default list.
19+
SUBDIRS = $$ALL_SUBDIRS
20+
SUBDIRS -= generator
21+
} else {
22+
# If neither special option is set, use the default build which includes everything.
23+
SUBDIRS = $$ALL_SUBDIRS
24+
}

0 commit comments

Comments
 (0)