author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Fri, 12 Mar 2010 15:46:37 +0200 | |
branch | RCL_3 |
changeset 5 | d3bac044e0f0 |
parent 3 | 41300fa6a67c |
permissions | -rw-r--r-- |
0 | 1 |
TEMPLATE = subdirs |
2 |
||
3 |
# this order is important |
|
4 |
unset(SRC_SUBDIRS) |
|
5 |
win32:SRC_SUBDIRS += src_winmain |
|
6 |
wince*:{ |
|
7 |
SRC_SUBDIRS += src_corelib src_xml src_gui src_sql src_network src_testlib |
|
8 |
} else:symbian { |
|
9 |
SRC_SUBDIRS += src_s60main src_corelib src_xml src_gui src_network src_sql src_testlib src_s60installs |
|
10 |
} else { |
|
11 |
SRC_SUBDIRS += src_corelib src_xml src_network src_gui src_sql src_testlib |
|
12 |
!vxworks:contains(QT_CONFIG, qt3support): SRC_SUBDIRS += src_qt3support |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
13 |
include(tools/tools.pro) |
0 | 14 |
contains(QT_CONFIG, dbus):SRC_SUBDIRS += src_dbus |
15 |
} |
|
16 |
win32:SRC_SUBDIRS += src_activeqt |
|
17 |
||
18 |
contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2): SRC_SUBDIRS += src_opengl |
|
19 |
contains(QT_CONFIG, openvg): SRC_SUBDIRS += src_openvg |
|
20 |
contains(QT_CONFIG, xmlpatterns): SRC_SUBDIRS += src_xmlpatterns |
|
21 |
contains(QT_CONFIG, phonon): SRC_SUBDIRS += src_phonon |
|
22 |
contains(QT_CONFIG, multimedia): SRC_SUBDIRS += src_multimedia |
|
23 |
contains(QT_CONFIG, svg): SRC_SUBDIRS += src_svg |
|
24 |
contains(QT_CONFIG, webkit) { |
|
25 |
#exists($$QT_SOURCE_TREE/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro): SRC_SUBDIRS += src_javascriptcore |
|
26 |
SRC_SUBDIRS += src_webkit |
|
27 |
} |
|
28 |
contains(QT_CONFIG, script): SRC_SUBDIRS += src_script |
|
29 |
contains(QT_CONFIG, scripttools): SRC_SUBDIRS += src_scripttools |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
30 |
contains(QT_CONFIG, declarative): SRC_SUBDIRS += src_declarative |
0 | 31 |
SRC_SUBDIRS += src_plugins |
32 |
||
33 |
src_s60main.subdir = $$QT_SOURCE_TREE/src/s60main |
|
34 |
src_s60main.target = sub-s60main |
|
35 |
src_s60installs.subdir = $$QT_SOURCE_TREE/src/s60installs |
|
36 |
src_s60installs.target = sub-s60installs |
|
37 |
src_winmain.subdir = $$QT_SOURCE_TREE/src/winmain |
|
38 |
src_winmain.target = sub-winmain |
|
39 |
src_corelib.subdir = $$QT_SOURCE_TREE/src/corelib |
|
40 |
src_corelib.target = sub-corelib |
|
41 |
src_xml.subdir = $$QT_SOURCE_TREE/src/xml |
|
42 |
src_xml.target = sub-xml |
|
43 |
src_xmlpatterns.subdir = $$QT_SOURCE_TREE/src/xmlpatterns |
|
44 |
src_xmlpatterns.target = sub-xmlpatterns |
|
45 |
src_dbus.subdir = $$QT_SOURCE_TREE/src/dbus |
|
46 |
src_dbus.target = sub-dbus |
|
47 |
src_gui.subdir = $$QT_SOURCE_TREE/src/gui |
|
48 |
src_gui.target = sub-gui |
|
49 |
src_sql.subdir = $$QT_SOURCE_TREE/src/sql |
|
50 |
src_sql.target = sub-sql |
|
51 |
src_network.subdir = $$QT_SOURCE_TREE/src/network |
|
52 |
src_network.target = sub-network |
|
53 |
src_svg.subdir = $$QT_SOURCE_TREE/src/svg |
|
54 |
src_svg.target = sub-svg |
|
55 |
src_script.subdir = $$QT_SOURCE_TREE/src/script |
|
56 |
src_script.target = sub-script |
|
57 |
src_scripttools.subdir = $$QT_SOURCE_TREE/src/scripttools |
|
58 |
src_scripttools.target = sub-scripttools |
|
59 |
src_opengl.subdir = $$QT_SOURCE_TREE/src/opengl |
|
60 |
src_opengl.target = sub-opengl |
|
61 |
src_openvg.subdir = $$QT_SOURCE_TREE/src/openvg |
|
62 |
src_openvg.target = sub-openvg |
|
63 |
src_qt3support.subdir = $$QT_SOURCE_TREE/src/qt3support |
|
64 |
src_qt3support.target = sub-qt3support |
|
65 |
src_phonon.subdir = $$QT_SOURCE_TREE/src/phonon |
|
66 |
src_phonon.target = sub-phonon |
|
67 |
src_multimedia.subdir = $$QT_SOURCE_TREE/src/multimedia |
|
68 |
src_multimedia.target = sub-multimedia |
|
69 |
src_activeqt.subdir = $$QT_SOURCE_TREE/src/activeqt |
|
70 |
src_activeqt.target = sub-activeqt |
|
71 |
src_plugins.subdir = $$QT_SOURCE_TREE/src/plugins |
|
72 |
src_plugins.target = sub-plugins |
|
73 |
src_testlib.subdir = $$QT_SOURCE_TREE/src/testlib |
|
74 |
src_testlib.target = sub-testlib |
|
75 |
src_javascriptcore.subdir = $$QT_SOURCE_TREE/src/3rdparty/webkit/JavaScriptCore |
|
76 |
src_javascriptcore.target = sub-javascriptcore |
|
77 |
src_webkit.subdir = $$QT_SOURCE_TREE/src/3rdparty/webkit/WebCore |
|
78 |
src_webkit.target = sub-webkit |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
79 |
src_declarative.subdir = $$QT_SOURCE_TREE/src/declarative |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
80 |
src_declarative.target = sub-declarative |
0 | 81 |
|
82 |
#CONFIG += ordered |
|
83 |
!wince*:!symbian:!ordered { |
|
84 |
src_corelib.depends = src_tools_moc src_tools_rcc |
|
85 |
src_gui.depends = src_corelib src_tools_uic |
|
86 |
embedded: src_gui.depends += src_network |
|
87 |
src_xml.depends = src_corelib |
|
88 |
src_xmlpatterns.depends = src_corelib src_network |
|
89 |
src_dbus.depends = src_corelib src_xml |
|
90 |
src_svg.depends = src_xml src_gui |
|
91 |
src_script.depends = src_corelib |
|
92 |
src_scripttools.depends = src_script src_gui src_network |
|
93 |
src_network.depends = src_corelib |
|
94 |
src_opengl.depends = src_gui |
|
95 |
src_openvg.depends = src_gui |
|
96 |
src_sql.depends = src_corelib |
|
97 |
src_testlib.depends = src_corelib |
|
98 |
src_qt3support.depends = src_gui src_xml src_network src_sql |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
99 |
src_tools_idc.depends = src_corelib # target defined in tools.pro |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
100 |
src_tools_uic3.depends = src_qt3support src_xml # target defined in tools.pro |
0 | 101 |
src_phonon.depends = src_gui |
102 |
src_multimedia.depends = src_gui |
|
103 |
src_tools_activeqt.depends = src_tools_idc src_gui |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
104 |
src_declarative.depends = src_xml src_gui src_script src_network src_svg |
0 | 105 |
src_plugins.depends = src_gui src_sql src_svg |
106 |
contains(QT_CONFIG, webkit) { |
|
107 |
src_webkit.depends = src_gui src_sql src_network src_xml |
|
108 |
contains(QT_CONFIG, phonon):src_webkit.depends += src_phonon |
|
5
d3bac044e0f0
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
109 |
contains(QT_CONFIG, xmlpatterns): src_webkit.depends += src_xmlpatterns |
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
110 |
contains(QT_CONFIG, declarative):src_declarative.depends += src_webkit |
0 | 111 |
#exists($$QT_SOURCE_TREE/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro): src_webkit.depends += src_javascriptcore |
112 |
} |
|
113 |
contains(QT_CONFIG, qt3support): src_plugins.depends += src_qt3support |
|
114 |
contains(QT_CONFIG, dbus):{ |
|
115 |
src_plugins.depends += src_dbus |
|
116 |
src_phonon.depends += src_dbus |
|
117 |
} |
|
118 |
contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2): src_plugins.depends += src_opengl |
|
119 |
} |
|
120 |
||
121 |
!symbian { |
|
122 |
# This creates a sub-src rule |
|
123 |
sub_src_target.CONFIG = recursive |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
124 |
sub_src_target.recurse = $$TOOLS_SUBDIRS $$SRC_SUBDIRS |
0 | 125 |
sub_src_target.target = sub-src |
126 |
sub_src_target.recurse_target = |
|
127 |
QMAKE_EXTRA_TARGETS += sub_src_target |
|
128 |
||
129 |
# This gives us a top level debug/release |
|
130 |
for(subname, SRC_SUBDIRS) { |
|
131 |
subdir = $$subname |
|
132 |
!isEmpty($${subname}.subdir):subdir = $$eval($${subname}.subdir) |
|
133 |
subpro = $$subdir/$${basename(subdir)}.pro |
|
134 |
!exists($$subpro):next() |
|
135 |
subtarget = $$replace(subdir, [^A-Za-z0-9], _) |
|
136 |
reg_src = $$replace(QT_SOURCE_TREE, \\\\, \\\\) |
|
137 |
subdir = $$replace(subdir, $$reg_src, $$QT_BUILD_TREE) |
|
138 |
subdir = $$replace(subdir, /, $$QMAKE_DIR_SEP) |
|
139 |
subdir = $$replace(subdir, \\\\, $$QMAKE_DIR_SEP) |
|
140 |
SUB_TEMPLATE = $$list($$fromfile($$subpro, TEMPLATE)) |
|
141 |
!isEqual(subname, src_tools_bootstrap):if(isEqual($$SUB_TEMPLATE, lib) | isEqual($$SUB_TEMPLATE, subdirs) | isEqual(subname, src_tools_idc) | isEqual(subname, src_tools_uic3)):!separate_debug_info { |
|
142 |
#debug |
|
143 |
eval(debug-$${subtarget}.depends = $${subdir}\$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_DEBUG_TARGETS) |
|
144 |
eval(debug-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) debug)) |
|
145 |
EXTRA_DEBUG_TARGETS += debug-$${subtarget} |
|
146 |
QMAKE_EXTRA_TARGETS += debug-$${subtarget} |
|
147 |
#release |
|
148 |
eval(release-$${subtarget}.depends = $${subdir}\$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_RELEASE_TARGETS) |
|
149 |
eval(release-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) release)) |
|
150 |
EXTRA_RELEASE_TARGETS += release-$${subtarget} |
|
151 |
QMAKE_EXTRA_TARGETS += release-$${subtarget} |
|
152 |
} else { #do not have a real debug target/release |
|
153 |
#debug |
|
154 |
eval(debug-$${subtarget}.depends = $${subdir}\$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_DEBUG_TARGETS) |
|
155 |
eval(debug-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) first)) |
|
156 |
EXTRA_DEBUG_TARGETS += debug-$${subtarget} |
|
157 |
QMAKE_EXTRA_TARGETS += debug-$${subtarget} |
|
158 |
#release |
|
159 |
eval(release-$${subtarget}.depends = $${subdir}\$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_RELEASE_TARGETS) |
|
160 |
eval(release-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) first)) |
|
161 |
EXTRA_RELEASE_TARGETS += release-$${subtarget} |
|
162 |
QMAKE_EXTRA_TARGETS += release-$${subtarget} |
|
163 |
} |
|
164 |
} |
|
165 |
debug.depends = $$EXTRA_DEBUG_TARGETS |
|
166 |
release.depends = $$EXTRA_RELEASE_TARGETS |
|
167 |
QMAKE_EXTRA_TARGETS += debug release |
|
168 |
} |
|
169 |
||
170 |
SUBDIRS += $$SRC_SUBDIRS |