summaryrefslogtreecommitdiff
path: root/src/engine/SCons/Tool/qt.xml
blob: ddff4cbf74d3feb94e31f43fad0bf7292cf32037 (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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
<!--
Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation

This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
-->
<tool name="qt">
<summary>
Sets construction variables for building Qt applications.
</summary>
<sets>
QTDIR
QT_BINPATH
QT_CPPPATH
QT_LIBPATH
QT_MOC
QT_UIC
QT_LIB
QT_AUTOSCAN
QT_UICIMPLFLAGS
QT_UICDECLFLAGS
QT_MOCFROMHFLAGS
QT_MOCFROMCXXFLAGS
QT_UICDECLPREFIX
QT_UICDECLSUFFIX
QT_UICIMPLPREFIX
QT_UICIMPLSUFFIX
QT_MOCHPREFIX
QT_MOCHSUFFIX
QT_MOCCXXPREFIX
QT_MOCCXXSUFFIX
QT_UISUFFIX
QT_UICCOM
QT_MOCFROMHCOM
QT_MOCFROMCXXCOM
</sets>
<uses>
</uses>
</tool>

<builder name="Moc">
<summary>
Builds an output file from a moc input file. Moc input files are either
header files or cxx files. This builder is only available after using the
tool 'qt'. See the &cv-link-QTDIR; variable for more information.
Example:

<example>
env.Moc('foo.h') # generates moc_foo.cc
env.Moc('foo.cpp') # generates foo.moc
</example>
</summary>
</builder>

<builder name="Uic">
<summary>
Builds a header file, an implementation file and a moc file from an ui file.
and returns the corresponding nodes in the above order.
This builder is only available after using the tool 'qt'. Note: you can
specify <filename>.ui</filename> files directly as source
files to the &b-Program;,
&b-Library; and &b-SharedLibrary; builders
without using this builder. Using this builder lets you override the standard
naming conventions (be careful: prefixes are always prepended to names of
built files; if you don't want prefixes, you may set them to ``).
See the &cv-link-QTDIR; variable for more information.
Example:

<example>
env.Uic('foo.ui') # -> ['foo.h', 'uic_foo.cc', 'moc_foo.cc']
env.Uic(target = Split('include/foo.h gen/uicfoo.cc gen/mocfoo.cc'),
        source = 'foo.ui') # -> ['include/foo.h', 'gen/uicfoo.cc', 'gen/mocfoo.cc']
</example>
</summary>
</builder>

<cvar name="QTDIR">
<summary>
The qt tool tries to take this from os.environ.
It also initializes all QT_*
construction variables listed below.
(Note that all paths are constructed
with python's os.path.join() method,
but are listed here with the '/' separator
for easier reading.)
In addition, the construction environment
variables &cv-link-CPPPATH;,
&cv-link-LIBPATH; and
&cv-link-LIBS; may be modified
and the variables
PROGEMITTER, SHLIBEMITTER and LIBEMITTER
are modified. Because the build-performance is affected when using this tool,
you have to explicitly specify it at Environment creation:

<example>
Environment(tools=['default','qt'])
</example>

The qt tool supports the following operations:

<emphasis Role="strong">Automatic moc file generation from header files.</emphasis>
You do not have to specify moc files explicitly, the tool does it for you.
However, there are a few preconditions to do so: Your header file must have
the same filebase as your implementation file and must stay in the same
directory. It must have one of the suffixes .h, .hpp, .H, .hxx, .hh. You
can turn off automatic moc file generation by setting QT_AUTOSCAN to 0.
See also the corresponding builder method
.B Moc()

<emphasis Role="strong">Automatic moc file generation from cxx files.</emphasis>
As stated in the qt documentation, include the moc file at the end of
the cxx file. Note that you have to include the file, which is generated
by the transformation ${QT_MOCCXXPREFIX}&lt;basename&gt;${QT_MOCCXXSUFFIX}, by default
&lt;basename&gt;.moc. A warning is generated after building the moc file, if you
do not include the correct file. If you are using VariantDir, you may
need to specify duplicate=1. You can turn off automatic moc file generation
by setting QT_AUTOSCAN to 0. See also the corresponding
&b-Moc;
builder method.

<emphasis Role="strong">Automatic handling of .ui files.</emphasis>
The implementation files generated from .ui files are handled much the same
as yacc or lex files. Each .ui file given as a source of Program, Library or
SharedLibrary will generate three files, the declaration file, the
implementation file and a moc file. Because there are also generated headers,
you may need to specify duplicate=1 in calls to VariantDir.
See also the corresponding
&b-Uic;
builder method.
</summary>
</cvar>

<cvar name="QT_AUTOSCAN">
<summary>
Turn off scanning for mocable files. Use the Moc Builder to explicitely
specify files to run moc on.
</summary>
</cvar>

<cvar name="QT_BINPATH">
<summary>
The path where the qt binaries are installed.
The default value is '&cv-link-QTDIR;/bin'.
</summary>
</cvar>

<cvar name="QT_CPPPATH">
<summary>
The path where the qt header files are installed.
The default value is '&cv-link-QTDIR;/include'.
Note: If you set this variable to None,
the tool won't change the &cv-link-CPPPATH;
construction variable.
</summary>
</cvar>

<cvar name="QT_DEBUG">
<summary>
Prints lots of debugging information while scanning for moc files.
</summary>
</cvar>

<cvar name="QT_LIB">
<summary>
Default value is 'qt'. You may want to set this to 'qt-mt'. Note: If you set
this variable to None, the tool won't change the &cv-link-LIBS; variable.
</summary>
</cvar>

<cvar name="QT_LIBPATH">
<summary>
The path where the qt libraries are installed.
The default value is '&cv-link-QTDIR;/lib'.
Note: If you set this variable to None,
the tool won't change the &cv-link-LIBPATH;
construction variable.
</summary>
</cvar>

<cvar name="QT_MOC">
<summary>
Default value is '&cv-link-QT_BINPATH;/moc'.
</summary>
</cvar>

<cvar name="QT_MOCCXXPREFIX">
<summary>
Default value is ''. Prefix for moc output files, when source is a cxx file.
</summary>
</cvar>

<cvar name="QT_MOCCXXSUFFIX">
<summary>
Default value is '.moc'. Suffix for moc output files, when source is a cxx
file.
</summary>
</cvar>

<cvar name="QT_MOCFROMCXXFLAGS">
<summary>
Default value is '-i'. These flags are passed to moc, when moccing a
C++ file.
</summary>
</cvar>

<cvar name="QT_MOCFROMCXXCOM">
<summary>
Command to generate a moc file from a cpp file.
</summary>
</cvar>

<cvar name="QT_MOCFROMCXXCOMSTR">
<summary>
The string displayed when generating a moc file from a cpp file.
If this is not set, then &cv-link-QT_MOCFROMCXXCOM; (the command line) is displayed.
</summary>
</cvar>

<cvar name="QT_MOCFROMHCOM">
<summary>
Command to generate a moc file from a header.
</summary>
</cvar>

<cvar name="QT_MOCFROMHCOMSTR">
<summary>
The string displayed when generating a moc file from a cpp file.
If this is not set, then &cv-link-QT_MOCFROMHCOM; (the command line) is displayed.
</summary>
</cvar>

<cvar name="QT_MOCFROMHFLAGS">
<summary>
Default value is ''. These flags are passed to moc, when moccing a header
file.
</summary>
</cvar>

<cvar name="QT_MOCHPREFIX">
<summary>
Default value is 'moc_'. Prefix for moc output files, when source is a header.
</summary>
</cvar>

<cvar name="QT_MOCHSUFFIX">
<summary>
Default value is '&cv-link-CXXFILESUFFIX;'. Suffix for moc output files, when source is
a header.
</summary>
</cvar>

<cvar name="QT_UIC">
<summary>
Default value is '&cv-link-QT_BINPATH;/uic'.
</summary>
</cvar>

<cvar name="QT_UICCOM">
<summary>
Command to generate header files from .ui files.
</summary>
</cvar>

<cvar name="QT_UICCOMSTR">
<summary>
The string displayed when generating header files from .ui files.
If this is not set, then &cv-link-QT_UICCOM; (the command line) is displayed.
</summary>
</cvar>

<cvar name="QT_UICDECLFLAGS">
<summary>
Default value is ''. These flags are passed to uic, when creating a a h
file from a .ui file.
</summary>
</cvar>

<cvar name="QT_UICDECLPREFIX">
<summary>
Default value is ''. Prefix for uic generated header files.
</summary>
</cvar>

<cvar name="QT_UICDECLSUFFIX">
<summary>
Default value is '.h'. Suffix for uic generated header files.
</summary>
</cvar>

<cvar name="QT_UICIMPLFLAGS">
<summary>
Default value is ''. These flags are passed to uic, when creating a cxx
file from a .ui file.
</summary>
</cvar>

<cvar name="QT_UICIMPLPREFIX">
<summary>
Default value is 'uic_'. Prefix for uic generated implementation files.
</summary>
</cvar>

<cvar name="QT_UICIMPLSUFFIX">
<summary>
Default value is '&cv-link-CXXFILESUFFIX;'. Suffix for uic generated implementation
files.
</summary>
</cvar>

<cvar name="QT_UISUFFIX">
<summary>
Default value is '.ui'. Suffix of designer input files.
</summary>
</cvar>