summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/qt_parts.prf
blob: 12ba312bcd859c86f7b56ed2ce09f2f3e99bcebe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#
#  W A R N I N G
#  -------------
#
# This file is not part of the Qt API.  It exists purely as an
# implementation detail.  It may change from version to version
# without notice, or even be removed.
#
# We mean it.
#

load(qt_build_config)

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_/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($$_PRO_FILE_PWD_/examples/examples.pro) {
    sub_examples.subdir = examples
    sub_examples.target = sub-examples
    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
}

# Some modules still have these
exists($$_PRO_FILE_PWD_/demos/demos.pro) {
    sub_demos.subdir = demos
    sub_demos.target = sub-demos
    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
}

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
    tests_need_tools: sub_tests.depends += sub_tools
    sub_tests.CONFIG = no_default_install
    !contains(QT_BUILD_PARTS, tests) {
        sub_tests.CONFIG += no_default_target
    } else {
        # Make sure these are there in case we need them
        sub_tools.CONFIG -= no_default_target
        sub_examples.CONFIG -= no_default_target
        sub_demos.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")