1 /****************************************************************************
3 ** Copyright (C) 2015 The Qt Company Ltd.
4 ** Contact: http://www.qt.io/licensing/
6 ** This file is part of the documentation of the Qt Toolkit.
8 ** $QT_BEGIN_LICENSE:FDL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and The Qt Company. For licensing terms
14 ** and conditions see http://www.qt.io/terms-conditions. For further
15 ** information use the contact form at http://www.qt.io/contact-us.
17 ** GNU Free Documentation License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Free
19 ** Documentation License version 1.3 as published by the Free Software
20 ** Foundation and appearing in the file included in the packaging of
21 ** this file. Please review the following information to ensure
22 ** the GNU Free Documentation License version 1.3 requirements
23 ** will be met: http://www.gnu.org/copyleft/fdl.html.
26 ****************************************************************************/
29 \page qmake-manual.html
31 \startpage {index.html}{Qt Reference Documentation}
32 \nextpage qmake Tutorial
37 \l{qmake}{\c qmake} is a tool that helps simplify the build process for
38 development project across different platforms. \l{qmake}{\c qmake}
39 automates the generation of Makefiles so that only a few lines of
40 information are needed to create each Makefile. \l{qmake}{\c qmake} can be
41 used for any software project, whether it is written in Qt or not.
43 \l{qmake}{\c qmake} generates a Makefile based on the information in a
44 project file. Project files are created by the developer, and are usually
45 simple, but more sophisticated project files can be created for complex
47 \l{qmake}{\c qmake} contains additional features to support development
48 with Qt, automatically including build rules for \l{moc.html}{moc}
49 and \l{uic.html}{uic}.
50 \l{qmake}{\c qmake} can also generate projects for Microsoft Visual studio
51 without requiring the developer to change the project file.
53 \section1 Getting Started
55 The \l{qmake Tutorial} and guide to \l{qmake Common Projects} provide overviews
56 that aim to help new users get started with \l{qmake}{\c qmake}.
60 \tableofcontents{1 qmake Tutorial}
64 \o \l{qmake Common Projects}
65 \tableofcontents{1 qmake Common Projects}
68 \section1 Table of Contents
72 \tableofcontents{1 Using qmake}
73 \o \l{qmake Project Files}
74 \tableofcontents{1 qmake Project Files}
76 \tableofcontents{1 Running qmake}
77 \o \l{qmake Platform Notes}
78 \tableofcontents{1 qmake Platform Notes}
79 \o \l{qmake Advanced Usage}
80 \tableofcontents{1 qmake Advanced Usage}
81 \o \l{Using Precompiled Headers}
82 \tableofcontents{1 Using Precompiled Headers}
83 \o \l{qmake Reference}
84 \tableofcontents{1 qmake Reference}
85 \o \l{qmake Variable Reference}
86 \tableofcontents{1 qmake Variable Reference}
87 \o \l{qmake Function Reference}
88 \tableofcontents{1 qmake Function Reference}
89 \o \l{Configuring qmake's Environment}
90 \tableofcontents{1 Configuring qmake's Environment}
95 \page qmake-using.html
97 \contentspage {qmake Manual}{Contents}
98 \previouspage qmake Manual
99 \nextpage qmake Project Files
101 \l{qmake Manual#qmake}{\c qmake} provides a project-oriented system for
102 managing the buildprocess for applications, libraries, and other components.
103 This approach gives developers control over the source files used, and
104 allows each of the steps in the process to be described concisely,
105 typically within a single file. \l{qmake Manual#qmake}{\c qmake} expands
106 the information in each project file to a Makefile that executes the necessary
107 commands for compiling and linking.
109 In this document, we provide a basic introduction to project files,
110 describe some of the main features of \l{qmake Manual#qmake}{\c qmake},
111 and show how to use \l{qmake Manual#qmake}{\c qmake} on the command line.
113 \section1 Describing a Project
115 Projects are described by the contents of project (\c .pro) files.
116 The information within these is used by \l{qmake Manual#qmake}{\c qmake}
117 to generate a Makefile containing all the commands that are needed to
119 Project files typically contain a list of source and header files,
120 general configuration information, and any application-specific details,
121 such as a list of extra libraries to link against, or a list of extra
122 include paths to use.
124 Project files can contain a number of different elements, including
125 comments, variable declarations, built-in functions, and some simple
126 control structures. In most simple projects, it is only necessary
127 to declare the source and header files that are used to build the
128 project with some basic configuration options.
130 Complete examples of project files can be found in the
132 An introduction to project files can be found in the
133 \l{qmake Project Files} chapter, and a more detailed description is
134 available in the \l{qmake Reference}.
136 \section1 Building a Project
138 For simple projects, you only need to run \l{qmake Manual#qmake}{\c qmake}
139 in the top level directory of your project. By default,
140 \l{qmake Manual#qmake}{\c qmake} generates a Makefile that you then use
141 to build the project, and you can then run your platform's \c make tool
142 to build the project.
144 \l{qmake Manual#qmake}{\c qmake} can also be used to generate project files.
145 A full description of \c{qmake}'s command line options can be found in the
146 \l{Running qmake} chapter of this manual.
148 \section1 Using Precompiled Headers
150 In large projects, it is possible to take advantage of precompiled
151 header files to speed up the build process. This feature is described
152 in detail in the \l{Using Precompiled Headers} chapter.
156 \page qmake-project-files.html
157 \title qmake Project Files
158 \contentspage {qmake Manual}{Contents}
159 \previouspage Using qmake
160 \nextpage Running qmake
162 Project files contain all the information required by
163 \l{qmake Manual#qmake}{\c qmake} to build your application, library,
164 or plugin. The resources used by your project are generally specified
165 using a series of declarations, but support for simple programming
166 constructs allow you to describe different build processes for different
167 platforms and environments.
171 \section1 Project File Elements
173 The project file format used by \l{qmake Manual#qmake}{\c qmake} can be
174 used to support both simple and fairly complex build systems.
175 Simple project files will use a straightforward declarative style,
176 defining standard variables to indicate the source and header files
177 that are used in the project. Complex projects may use the control flow
178 structures to fine-tune the build process.
180 The following sections describe the different types of elements used
185 In a project file, variables are used to hold lists of strings. In the
186 simplest projects, these variables inform \l{qmake Manual#qmake}{\c qmake}
187 about the configuration options to use, or supply filenames and paths to
188 use in the build process.
190 \l{qmake Manual#qmake}{\c qmake} looks for certain variables in each
191 project file, and it uses the contents of these to determine what it
192 should write to a Makefile. For example, the list of values in the
193 \c HEADERS and \c SOURCES variables are used to tell
194 \l{qmake Manual#qmake}{\c qmake} about header and source files in the
195 same directory as the project file.
197 Variables can also be used internally to store temporary lists of values,
198 and existing lists of values can be overwritten or extended with new
201 The following lines show how lists of values are assigned to variables:
203 \snippet doc/src/snippets/qmake/variables.pro 0
205 Note that the first assignment only includes values that are specified on
206 the same line as the \c SOURCES variable. The second assignment splits
207 the items across lines by using the \c \\ character.
209 The list of values in a variable is extended in the following way:
211 \snippet doc/src/snippets/qmake/variables.pro 1
213 The \c CONFIG variable is another special variable that
214 \l{qmake Manual#qmake}{\c qmake} uses when generating a Makefile.
215 It is discussed in the section on
216 \l{#GeneralConfiguration}{general configuration} later in this chapter.
217 In the above line, \c qt is added to the list of existing values
218 contained in \c CONFIG.
220 The following table lists the variables that \l{qmake Manual#qmake}{\c qmake}
221 recognizes, and describes what they should contain.
224 \header \o Variable \o Contents
225 \row \o CONFIG \o General project configuration options.
226 \row \o DESTDIR \o The directory in which the executable or binary file will
228 \row \o FORMS \o A list of UI files to be processed by \c uic.
229 \row \o HEADERS \o A list of filenames of header (.h) files used when
230 building the project.
231 \row \o QT \o Qt-specific configuration options.
232 \row \o RESOURCES \o A list of resource (.rc) files to be included in the
233 final project. See the \l{The Qt Resource System} for
234 more information about these files.
235 \row \o SOURCES \o A list of source code files to be used when building
237 \row \o TEMPLATE \o The template to use for the project. This determines
238 whether the output of the build process will be an
239 application, a library, or a plugin.
242 The contents of a variable can be read by prepending the variable name with
243 \c $$. This can be used to assign the contents of one variable to another:
245 \snippet doc/src/snippets/qmake/dereferencing.pro 0
247 The \c $$ operator is used extensively with built-in functions that operate
248 on strings and lists of values. These are described in the chapter on
249 \l{qmake Advanced Usage}.
253 Normally, variables are used to contain whitespace-separated lists
254 of values. However, it is sometimes necessary to specify values containing
255 spaces. These must be quoted by using double quotes:
257 \snippet doc/src/snippets/qmake/quoting.pro 0
259 The quoted text is treated as a single item in the list of values held by
260 the variable. A similar approach is used to deal with paths that contain
261 spaces, particularly when defining the
262 \l{qmake Variable Reference#INCLUDEPATH}{INCLUDEPATH} and
263 \l{qmake Variable Reference#LIBS}{LIBS} variables for the Windows platform:
265 \snippet doc/src/snippets/qmake/spaces.pro quoting include paths with spaces
269 You can add comments to project files. Comments begin with the \c
270 # character and continue to the end of the same line. For example:
272 \snippet doc/src/snippets/qmake/comments.pro 0
274 To include the \c # character in variable assignments, it is necessary
275 to use the contents of the built-in \c LITERAL_HASH variable. See the
276 \l{qmake Variable Reference#LITERAL_HASH}{variable reference} for more
279 \section2 Built-in Functions and Control Flow
281 \l{qmake Manual#qmake}{\c qmake} provides a number of built-in functions
282 to allow the contents of variables to be processed.
283 The most commonly used function in simple
284 project files is the \c include function which takes a filename as an
285 argument. The contents of the given file are included in the project
286 file at the place where the \c include function is used.
287 The \c include function is most commonly used to include other project
290 \snippet doc/src/snippets/qmake/include.pro 0
292 Support for conditional structures is made available via
293 \l{qmake Advanced Usage#scopes}{scopes} that behave like \c if
294 statements in programming languages:
296 \snippet doc/src/snippets/qmake/scopes.pro 0
298 The assignments inside the braces are only made if the condition is
299 true. In this case, the special \c win32 variable must be set; this
300 happens automatically on Windows, but this can also be specified on
301 other platforms by running \l{qmake Manual#qmake}{\c qmake}
302 with the \c{-win32} command line
303 option (see \l{Running qmake} for more information). The opening
304 brace must stand on the same line as the condition.
306 Simple loops are constructed by iterating over lists of values using
307 the built-in \c for function. The following code adds directories
308 to the \l{qmake Variable Reference#SUBDIRS}{SUBDIRS} variable, but
311 \snippet doc/src/snippets/qmake/functions.pro 0
313 More complex operations on variables that would usually require loops
314 are provided by built-in functions such as \c find, \c unique, and
315 \c count. These functions, and many others are provided to manipulate
316 strings and paths, support user input, and call external tools. A list
317 of the functions available can be found in the
318 \l{qmake Advanced Usage} chapter of this manual.
320 \section1 Project Templates
322 The \c TEMPLATE variable is used to define the type of project that will
323 be built. If this is not declared in the project file,
324 \l{qmake Manual#qmake}{\c qmake} assumes that an application should be
325 built, and will generate an appropriate Makefile (or equivalent file)
328 The types of project available are listed in the following table with
329 information about the files that \l{qmake Manual#qmake}{\c qmake}
330 will generate for each of them:
333 \header \o Template \o Description of \l{qmake Manual#qmake}{\c qmake} output
334 \row \o app (default) \o Creates a Makefile to build an application.
335 \row \o lib \o Creates a Makefile to build a library.
336 \row \o subdirs \o Creates a Makefile containing rules for the
337 subdirectories specified using the \l{qmake Variable Reference#SUBDIRS}{SUBDIRS}
338 variable. Each subdirectory must contain its own project file.
339 \row \o vcapp \o Creates a Visual Studio Project file to build
341 \row \o vclib \o Creates a Visual Studio Project file to build a library.
342 \row \o vcsubdirs \o Creates a Visual Studio Solution file to build projects in sub-directories.
345 See the \l{qmake Tutorial} for advice on writing project files for
346 projects that use the \c app and \c lib templates.
348 When the \c subdirs template is used, \l{qmake Manual#qmake}{\c qmake}
349 generates a Makefile to examine each specified subdirectory,
350 process any project file it finds there, and run the platform's
351 \c make tool on the newly-created Makefile.
352 The \l{qmake Variable Reference#SUBDIRS}{SUBDIRS} variable is used to
353 contain a list of all the subdirectories to be processed.
355 \target GeneralConfiguration
356 \section1 General Configuration
358 The \l{qmake Variable Reference#CONFIG}{CONFIG variable} specifies the
359 options and features that the compiler should use and the libraries that
360 should be linked against. Anything can be added to the \c CONFIG variable,
361 but the options covered below are recognized by
362 \l{qmake Manual#qmake}{\c qmake} internally.
364 The following options control the compiler flags that are used to build the
368 \header \o Option \o Description
369 \row \o release \o The project is to be built in release mode.
370 This is ignored if \c debug is also specified.
371 \row \o debug \o The project is to be built in debug mode.
372 \row \o debug_and_release \o The project is built in \e both debug and
374 \row \o debug_and_release_target \o The project is built in \e both debug
375 and release modes. TARGET is built into \e both the debug and release directories.
376 \row \o build_all \o If \c debug_and_release is specified, the project is
377 built in both debug and release modes by default.
378 \row \o autogen_precompile_source \o Automatically generates a \c .cpp file that includes
379 the precompiled header file specified in the .pro file.
380 \row \o ordered \o When using the \c subdirs template, this option
381 specifies that the directories listed should be processed in the
382 order in which they are given.
383 \row \o warn_on \o The compiler should output as many warnings as possible.
384 This is ignored if \c warn_off is specified.
385 \row \o warn_off \o The compiler should output as few warnings as possible.
386 \row \o copy_dir_files \o Enables the install rule to also copy directories, not just files.
389 The \c debug_and_release option is special in that it enables \e both debug and
390 release versions of a project to be built. In such a case, the Makefile that
391 \l{qmake Manual#qmake}{\c qmake} generates includes a rule that builds both versions,
392 and this can be invoked in the following way:
394 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 0
396 Adding the \c build_all option to the \c CONFIG variable makes this rule
397 the default when building the project, and installation targets will be
398 created for both debug and release builds.
400 Note that each of the options specified in the \c CONFIG variable can also be
401 used as a scope condition.
402 You can test for the presence of certain configuration options by using the
403 built-in \l{qmake Function Reference#CONFIG(config)}{CONFIG()} function.
404 For example, the following lines show the function as the condition in a scope
405 to test whether only the \c opengl option is in use:
407 \snippet doc/src/snippets/qmake/configscopes.pro 4
408 \snippet doc/src/snippets/qmake/configscopes.pro 5
410 This enables different configurations to be defined for \c release and
411 \c debug builds, and is described in more detail in the
412 \l{qmake Advanced Usage#Scopes}{Scopes} section of the
413 \l{qmake Advanced Usage}{Advanced Usage} chapter of this manual.
415 The following options define the type of project to be built. Note that some
416 of these options only take effect when used on the relevant platform. On other
417 platforms, they have no effect.
420 \header \o Option \o Description
421 \row \o qt \o The project is a Qt application and should link against the Qt
422 library. You can use the \c QT variable to control any additional
423 Qt modules that are required by your application.
424 \row \o thread \o The project is a multi-threaded application.
425 \row \o x11 \o The project is an X11 application or library.
428 When using \l{qmake Variable Reference#TEMPLATE}{application or library project
429 templates}, more specialized configuration options can be used to fine tune the
430 build process. These are explained in details in the
431 \l{qmake-common-projects.html}{Common Projects} chapter of this manual.
433 For example, if your application uses the Qt library and you want to
434 build it as a multi-threaded application in \c debug mode, your project
435 file will contain the following line:
437 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 1
439 Note, that you must use "+=", not "=", or \l{qmake Manual#qmake}{\c qmake}
440 will not be able to use Qt's configuration to determine the settings
441 needed for your project. More information about operators can be found in the
442 \l{qmake Advanced Usage#Operators}
443 {Operators} section of the \l{qmake Advanced Usage}
446 \section1 Declaring Qt Libraries
448 If the \c CONFIG variable contains the \c qt value, qmake's support for Qt
449 applications is enabled. This makes it possible to fine-tune which of the
450 Qt modules are used by your application. This is achieved with the \c QT
451 variable which can be used to declare the required extension modules.
452 For example, we can enable the XML and network modules in the following way:
454 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 2
456 Note that \c QT includes the \c core and \c gui modules by default, so the
457 above declaration \e adds the network and XML modules to this default list.
458 The following assignment \e omits the default modules, and will lead to
459 errors when the application's source code is being compiled:
461 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 3
463 If you want to build a project \e without the \c gui module, you need to
464 exclude it with the "-=" operator. By default, \c QT contains both
465 \c core and \c gui, so the following line will result in a minimal
466 Qt project being built:
468 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 4
470 More information about operators can be found in the
471 \l{qmake Advanced Usage#Operators}
472 {Operators} section of the \l{qmake Advanced Usage}
475 The table below shows the options that can be used with the \c QT variable
476 and the features that are associated with each of them:
479 \header \o Option \o Features
480 \row \o core (included by default) \o QtCore module
481 \row \o gui (included by default) \o QtGui module
482 \row \o network \o QtNetwork module
483 \row \o opengl \o QtOpenGL module
484 \row \o sql \o QtSql module
485 \row \o svg \o QtSvg module
486 \row \o xml \o QtXml module
487 \row \o xmlpatterns \o QtXmlPatterns module
488 \row \o qt3support \o Qt3Support module
491 Note that adding the \c opengl option to the \c QT variable automatically
492 causes the equivalent option to be added to the \c CONFIG variable.
493 Therefore, for Qt applications, it is not necessary to add the \c opengl
494 option to both \c CONFIG and \c{QT}.
496 \section1 Configuration Features
498 \l{qmake Manual#qmake}{\c qmake} can be set up with extra configuration
499 features that are specified in feature (.prf) files. These extra features
500 often provide support for custom tools that are used during the build
501 process. To add a feature to the build process, append the feature name
502 (the stem of the feature filename) to the \c CONFIG variable.
504 For example, \l{qmake Manual#qmake}{\c qmake} can configure the build
505 process to take advantage of external libraries that are supported by
506 \l{http://www.freedesktop.org/wiki/Software_2fpkgconfig}{pkg-config},
507 such as the D-Bus and ogg libraries, with the following lines:
509 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 5
511 More information about features can be found in the
512 \l{qmake Advanced Usage#Adding New Configuration Features}
513 {Adding New Configuration Features} section of the \l{qmake Advanced Usage}
516 \section1 Declaring Other Libraries
518 If you are using other libraries in your project in addition to those
519 supplied with Qt, you need to specify them in your project file.
521 The paths that \l{qmake Manual#qmake}{\c qmake} searches for libraries
522 and the specific libraries to link against can be added to the list of values in the
523 \l{qmake Variable Reference#LIBS}{LIBS} variable. The paths to the libraries
524 themselves can be given, or the familiar Unix-style notation for specifying
525 libraries and paths can be used if preferred.
527 For example, the following lines show how a library can be specified:
529 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 6
531 The paths containing header files can also be specified in a similar way
532 using the \l{qmake Variable Reference#INCLUDEPATH}{INCLUDEPATH} variable.
534 For example, it is possible to add several paths to be searched for header
537 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 7
541 \page qmake-running.html
543 \contentspage {qmake Manual}{Contents}
544 \previouspage qmake Project Files
545 \nextpage qmake Platform Notes
547 The behavior of \l{qmake Manual#qmake}{\c qmake} can be customized when it
548 is run by specifying various options on the command line. These allow the
549 build process to be fine-tuned, provide useful diagnostic
550 information, and can be used to specify the target platform for
556 \section1 Command-Line Options
560 The syntax used to run \l{qmake Manual#qmake}{\c qmake} takes the
561 following simple form:
563 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 8
565 \l{qmake Manual#qmake}{\c qmake} supports two different modes of operation:
566 In the default mode,\l{qmake Manual#qmake}{\c qmake} will use the
567 description in a project file to generate a Makefile, but it is also
568 possible to use \l{qmake Manual#qmake}{\c qmake} to generate project files.
569 If you want to explicitly set the mode, you must specify it before all
570 other options. The \c mode can be either of the following two values:
574 \l{qmake Manual#qmake}{\c qmake} output will be a Makefile.
576 \l{qmake Manual#qmake}{\c qmake} output will be a project file. \BR
577 \bold{Note:} It is likely that the created file will need to be edited; for example,
578 adding the \c QT variable to suit what modules are required for the project.
581 The following \c options are used to specify both general and mode-specific
582 settings. Options that only apply to the Makefile mode are described in the
583 \l{#MakefileMode}{Makefile Mode Options} section; options that influence the
584 creation of project files are described in the
585 \l{#ProjectMode}{Project File Options} section.
587 The \c files argument represents a list of one or more project files, separated
592 A wide range of options can be specified on the command line to
593 \l{qmake Manual#qmake}{\c qmake} in order to customize the build process,
594 and to override default settings for your platform. The following basic
595 options provide usage information, specify where
596 \l{qmake Manual#qmake}{\c qmake} writes the output file, and control the
597 level of debugging information that will be written to the console:
601 \l{qmake Manual#qmake}{\c qmake} will go over these features and give some
604 \l{qmake Manual#qmake}{\c qmake} output will be directed to \e file. If
605 this option is not specified, \l{qmake Manual#qmake}{\c qmake} will try
606 to use a suitable file name for its output, depending on the mode it is
608 If '-' is specified, output is directed to stdout.
610 \l{qmake Manual#qmake}{\c qmake} will output debugging information.
613 For projects that need to be built differently on each target platform,
614 with many subdirectories, you can run \l{qmake Manual#qmake}{\c qmake} with
615 each of the following options to set the corresponding platform-specific
616 variable in each project file:
620 \l{qmake Manual#qmake}{\c qmake} will run in unix mode. In this mode,
621 Unix file naming and path conventions will be used, additionally
622 testing for \c unix (as a scope) will succeed. This is the default
625 \l{qmake Manual#qmake}{\c qmake} will run in Mac OS X mode. In this
626 mode, Unix file naming and path conventions will be used, additionally
627 testing for \c macx (as a scope) will succeed. This is the default mode
630 \l{qmake Manual#qmake}{\c qmake} will run in win32 mode. In this mode,
631 Windows file naming and path conventions will be used, additionally
632 testing for \c win32 (as a scope) will succeed. This is the default
636 The template used for the project is usually specified by the \c TEMPLATE
637 variable in the project file. We can override or modify this by using the
642 \l{qmake Manual#qmake}{\c qmake} will override any set \c TEMPLATE
643 variables with tmpl, but only \e after the .pro file has been processed.
645 \l{qmake Manual#qmake}{\c qmake} will add the prefix to the \c TEMPLATE
649 The level of warning information can be fine-tuned to help you find problems in
654 \l{qmake Manual#qmake}{\c qmake} will report all known warnings.
656 No warning information will be generated by \
657 l{qmake Manual#qmake}{\c qmake}.
659 \l{qmake Manual#qmake}{\c qmake} will only generate parser warnings.
660 This will alert you to common pitfalls and potential problems in the
661 parsing of your project files.
663 \l{qmake Manual#qmake}{\c qmake} will warn of common pitfalls and
664 potential problems in your project file. For example,
665 \l{qmake Manual#qmake}{\c qmake} will report whether a file is placed
666 into a list of files multiple times, or if a file cannot be found.
670 \section2 Makefile Mode Options
672 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 9
674 In Makefile mode, \l{qmake Manual#qmake}{\c qmake} will generate a Makefile
675 that is used to build the project. Additionally, the following options may
676 be used in this mode to influence the way the project file is generated:
680 \l{qmake Manual#qmake}{\c qmake} will process assignments given on the
681 command line after the specified files.
683 \l{qmake Manual#qmake}{\c qmake} will ignore the .qmake.cache file.
685 \l{qmake Manual#qmake}{\c qmake} will not generate any dependency
687 \o \c -cache file \BR
688 \l{qmake Manual#qmake}{\c qmake} will use \e file as the cache file,
689 ignoring any other .qmake.cache files found.
691 \l{qmake Manual#qmake}{\c qmake} will use \e spec as a path to
692 platform and compiler information, and the value of \c QMAKESPEC will
696 You may also pass \l{qmake Manual#qmake}{\c qmake} assignments on the
697 command line; they will be processed before all of the files specified.
700 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 10
702 This will generate a Makefile, from test.pro with Unix pathnames. However
703 many of the specified options aren't necessary as they are the default.
704 Therefore, the line can be simplified on Unix to:
706 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 11
708 If you are certain you want your variables processed after the
709 files specified, then you may pass the \c -after option. When this
710 is specified, all assignments on the command line after the \c -after
711 option will be postponed until after the specified files are parsed.
714 \section2 Project Mode Options
716 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 12
718 In project mode, \l{qmake Manual#qmake}{\c qmake} will generate a project
719 file. Additionally, you may supply the following options in this mode:
723 \l{qmake Manual#qmake}{\c qmake} will look through supplied directories
726 \l{qmake Manual#qmake}{\c qmake} will not look in your current working
727 directory for source code and only use the specified \c files
730 In this mode, the \c files argument can be a list of files or directories.
731 If a directory is specified, it will be included in the \c DEPENDPATH
732 variable, and relevant code from there will be included in the generated
733 project file. If a file is given, it will be appended to the correct
734 variable, depending on its extension; for example, UI files are added
735 to \c FORMS, and C++ files are added to \c SOURCES.
737 You may also pass assignments on the command line in this mode. When doing
738 so, these assignments will be placed last in the generated project file.
742 \page qmake-platform-notes.html
743 \title qmake Platform Notes
744 \contentspage {qmake Manual}{Contents}
745 \previouspage Running qmake
746 \nextpage qmake Advanced Usage
748 Many cross-platform projects can be handled by the \c{qmake}'s basic
749 configuration features. On some platforms, it is sometimes useful, or even
750 necessary, to take advantage of platform-specific features.
751 \l{qmake Manual#qmake}{\c qmake} knows about many of these features, and
752 these can be accessed via specific variables that only have an effect on
753 the platforms where they are relevant.
759 Features specific to this platform include support for creating universal
760 binaries, frameworks and bundles.
762 \section2 Source and Binary Packages
764 The version of \l{qmake Manual#qmake}{\c qmake} supplied in source packages
765 is configured slightly differently to that supplied in binary packages in
766 that it uses a different feature specification. Where the source package
767 typically uses the \c macx-g++ specification, the binary package is
768 typically configured to use the \c macx-xcode specification.
770 Users of each package can override this configuration by invoking
771 \l{qmake Manual#qmake}{\c qmake} with the \c -spec option (see
772 \l{Running qmake} for more information). This makes it possible, for
773 example, to use \l{qmake Manual#qmake}{\c qmake} from a binary package to
774 create a Makefile in a project directory with the following command line
777 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 13
779 \section2 Using Frameworks
781 \l{qmake Manual#qmake}{\c qmake} is able to automatically generate build
782 rules for linking against frameworks in the standard framework directory on
783 Mac OS X, located at \c{/Library/Frameworks/}.
785 Directories other than the standard framework directory need to be specified
786 to the build system, and this is achieved by appending linker options to the
787 \l{qmake Variable Reference#QMAKE_LFLAGS}{QMAKE_LFLAGS} variable, as shown
788 in the following example:
790 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 14
792 The framework itself is linked in by appending the \c{-framework} options and
793 the name of the framework to the \l{qmake Variable Reference#LIBS}{LIBS}
796 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 15
798 \section2 Creating Frameworks
800 Any given library project can be configured so that the resulting library
802 \l{http://developer.apple.com/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/WhatAreFrameworks.html}
803 {framework}, ready for deployment. To do this, set up the project to use the
804 \l{qmake Variable Reference#TEMPLATE}{\c lib template} and add the
805 \c lib_bundle option to the
806 \l{qmake Variable Reference#CONFIG}{CONFIG} variable:
808 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 16
810 The data associated with the library is specified using the
811 \l{qmake Variable Reference#QMAKE_BUNDLE_DATA}{QMAKE_BUNDLE_DATA}
812 variable. This holds items that will be installed with a library
813 bundle, and is often used to specify a collection of header files,
814 as in the following example:
816 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 17
818 Here, the \c FRAMEWORK_HEADERS variable is a user-defined variable that
819 is used to define the headers required to use a particular framework.
820 Appending it to the \c QMAKE_BUNDLE_DATA variable ensures that the
821 information about these headers are added to the collection of
822 resources that will be installed with the library bundle. Also, the
823 framework's name and version are specified by
824 \l{qmake Variable Reference#QMAKE_FRAMEWORK_BUNDLE_NAME}
825 {QMAKE_FRAMEWORK_BUNDLE_NAME}
826 and \l{qmake Variable Reference#QMAKE_FRAMEWORK_VERSION}
827 {QMAKE_FRAMEWORK_VERSION} variables. By default, the values used for
828 these are obtained from the \l{qmake Variable Reference#TARGET}{TARGET}
829 and \l{qmake Variable Reference#VERSION}{VERSION} variables.
831 See \l{Deploying an Application on Mac OS X} for more information about
832 deploying applications and libraries.
834 \section2 Creating Universal Binaries
836 To create a universal binary for your application, you need to be using
837 a version of Qt that has been configured with the \c{-universal} option.
839 The architectures to be supported in the binary are specified with the
840 \l{qmake Variable Reference#CONFIG}{CONFIG} variable. For example, the
841 following assignment causes \l{qmake Manual#qmake}{\c qmake} to generate
842 build rules to create a universal binary for both PowerPC and x86
845 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 18
847 Additionally, developers using a PowerPC-based platform need to set the
848 \l{qmake Variable Reference#QMAKE_MAC_SDK}{QMAKE_MAC_SDK} variable.
849 This process is discussed in more detail in the
850 \l{Deploying an Application on Mac OS X#Architecture Dependencies}{deployment guide for Mac OS X}.
852 \section2 Creating and Moving Xcode Projects
854 Developers on Mac OS X can take advantage of \c{qmake}'s support for Xcode
855 project files, as described in
856 \l{Qt is Mac OS X Native#Development Tools}{Qt is Mac OS X Native},
857 by running \l{qmake Manual#qmake}{\c qmake} to generate an Xcode project
858 from an existing \l{qmake Manual#qmake}{\c qmake} project files. For
861 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 19
863 Note that, if a project is later moved on the disk,
864 \l{qmake Manual#qmake}{\c qmake} must be run again to process the project
865 file and create a new Xcode project file.
867 \section2 On supporting two build targets simultaneously
869 Implementing this is currently not feasible, because the XCode
870 concept of Active Build Configurations is conceptually different
871 from the qmake idea of build targets.
873 The XCode Active Build Configurations settings are for modifying
874 xcode configurations, compiler flags and similar build
875 options. Unlike Visual Studio, XCode does not allow for the
876 selection of specific library files based on whether debug or
877 release build configurations are selected. The qmake debug and
878 release settings control which library files are linked to the
881 It is currently not possible to set files in XCode configuration
882 settings from the qmake generated xcode project file. The way the
883 libraries are linked in the "Frameworks & Libraries" phase in the
886 Furthermore, the selected "Active Build Configuration" is stored
887 in a .pbxuser file, which is generated by xcode on first load, not
892 Features specific to this platform include support for creating Visual
893 Studio project files and handling manifest files when deploying Qt
894 applications developed using Visual Studio 2005.
896 \section2 Creating Visual Studio Project Files
898 Developers using Visual Studio to write Qt applications can use the
899 Visual Studio integration facilities provided with the
900 \l{Qt Commercial Edition} and do not need to worry about how
901 project dependencies are managed.
903 However, some developers may need to import an existing
904 \l{qmake Manual#qmake}{\c qmake} project into Visual Studio.
905 \l{qmake Manual#qmake}{\c qmake} is able to take a project file and create
906 a Visual Studio project that contains all the necessary information
907 required by the development environment. This is achieved by setting the
908 \l{qmake Manual#qmake}{\c qmake}
909 \l{qmake Variable Reference#TEMPLATE}{project template} to either \c vcapp
910 (for application projects) or \c vclib (for library projects).
912 This can also be set using a command line option, for example:
914 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 20
916 It is possible to recursively generate \c{.vcproj} files in subdirectories
917 and a \c{.sln} file in the main directory, by typing:
919 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 21
921 Each time you update the project file, you need to run
922 \l{qmake Manual#qmake}{\c qmake} to generate an updated Visual Studio
925 \note If you are using the Visual Studio Add-in, you can import \c .pro
926 files via the \gui{Qt->Import from .pro file} menu item.
928 \section2 Visual Studio 2005 Manifest Files
930 When deploying Qt applications built using Visual Studio 2005, it is
931 necessary to ensure that the manifest file, created when the application
932 was linked, is handled correctly. This is handled automatically for
933 projects that generate DLLs.
935 Removing manifest embedding for application executables can be done with
936 the following assignment to the \l{qmake Variable Reference#CONFIG}
939 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 22
941 Also, the manifest embedding for DLLs can be removed with the following
942 assignment to the \l{qmake Variable Reference#CONFIG}{CONFIG} variable:
944 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 23
946 This is discussed in more detail in the
947 \l{Deploying an Application on Windows#Visual Studio 2005 Onwards}
948 {deployment guide for Windows}.
951 \section1 Symbian Platform
953 Features specific to this platform include handling of static data,
954 capabilities, stack and heap size, compiler specific options, and unique
955 identifiers for the application or library.
957 \section2 Handling of Static Data
959 If the application uses any static data, the build system needs to be
960 informed about it. This is because Symbian tries to save memory if no
961 static data is in use.
963 To specify that static data support is desired, add this to the project file:
965 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 129
967 The default value is zero.
969 \section2 Stack and Heap Size
971 The Symbian platform uses predefined sizes for stacks and heaps. If an
972 application exceeds either limit, it may crash or fail to complete its
973 task. Crashes that seem to have no reason can often be traced back to
974 insufficient stack and/or heap sizes.
976 The stack size has a maximum value, whereas the heap size has a
977 minimum and a maximum value, all specified in bytes. The minimum value
978 prevents the application from starting if that amount of memory is not available. The
979 minimum and maximum values are separated by a space. For example:
981 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 130
983 The default values depend on the version of the Symbian SDK you're using,
984 however, the Qt toolchain sets this to the maximum possible value and this
985 should not be changed.
987 \section2 Compiler-Specific Options
989 General compiler options can as usual be set using \c QMAKE_CFLAGS and \c QMAKE_CXXFLAGS.
990 In order to set specific compiler options, \c QMAKE_CFLAGS.<compiler> and
991 \c QMAKE_CXXFLAGS.<compiler> can be used. \c <compiler> can be either \c CW for the WINSCW
992 architecture (emulator), or \c ARMCC for the ARMv5 architecture (hardware), or \c GCCE for
993 the ARMv5 architecture (hardware).
997 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 131
999 \section2 Unique Identifiers
1001 Symbian applications may have unique identifiers attached to them.
1002 Here is how to define them in a project file:
1004 There are four available types of IDs supported: \c UID2, \c UID3, \c SID, and \c VID. They
1005 are specified like this:
1007 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 132
1009 If \c SID is not specified, it defaults to the same value as \c UID3.
1010 If \c UID3 is not specified, qmake will automatically generate a \c UID3
1011 suitable for development and debugging. This value should be manually
1012 specified for applications that are to be released. See the
1013 \l{Symbian Signed} Web site for information about obtaining an official
1014 UID. Both \c SID and \c VID default to empty values.
1016 There exists one UID1 too, but this should not be touched by any application.
1018 The UID2 has a specific value for different types of files; e.g. apps/exes
1019 are always 0x100039CE. The toolchain will set this for value for the most common file types like,
1020 EXE/APP and shared library DLL.
1022 For more information about unique identifiers and their meaning for
1023 Symbian applications, please refer to the \l{UID Q&As (Symbian Signed)}
1024 page in the \l{Forum Nokia Wiki} for more information.
1026 \section2 Capabilities
1028 Capabilities define extra privileges for the application, such as the
1029 ability to list all files on the file system. Capabilities are defined
1030 in the project file like this:
1032 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 133
1034 It is also possible to specify which capabilities \e not to have,
1035 by first specifying \c ALL and then list the unwanted capabilities
1036 with a minus in front of them, like this:
1038 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 134
1040 For more information about capabilities, please refer to the Symbian SDK documentation.
1044 \page qmake-reference.html
1045 \title qmake Reference
1046 \contentspage {qmake Manual}{Contents}
1047 \previouspage Using Precompiled Headers
1048 \nextpage qmake Variable Reference
1050 This reference is a detailed index of all the variables and function that
1051 are available for use in \l{qmake Manual#qmake}{\c qmake} project files.
1053 \section1 Variable Reference
1055 The \l{qmake Variable Reference} describes the variables that are
1056 recognized by \l{qmake Manual#qmake}{\c qmake}when configuring the build
1057 process for projects.
1059 \section1 Function Reference
1061 The \l{qmake Function Reference} describes the function that can be
1062 used to process the contents of variables defined in project files.
1064 \target FrequentlyUsedVariables
1065 \section1 Frequently Used Variables
1067 The following variables are frequently used in project files to describe
1068 common aspects of the build process. These are fully described in the
1069 \l{qmake-variable-reference.html}{Variable Reference}.
1072 \o \l{qmake Variable Reference#CONFIG}{CONFIG}
1073 \o \l{qmake Variable Reference#DEF_FILE}{DEF_FILE}
1074 \o \l{qmake Variable Reference#DEFINES}{DEFINES}
1075 \o \l{qmake Variable Reference#DESTDIR}{DESTDIR}
1076 \o \l{qmake Variable Reference#DISTFILES}{DISTFILES}
1077 \o \l{qmake Variable Reference#DLLDESTDIR}{DLLDESTDIR}
1078 \o \l{qmake Variable Reference#FORMS}{FORMS}
1079 \o \l{qmake Variable Reference#FORMS3}{FORMS3}
1080 \o \l{qmake Variable Reference#GUID}{GUID}
1081 \o \l{qmake Variable Reference#HEADERS}{HEADERS}
1082 \o \l{qmake Variable Reference#INCLUDEPATH}{INCLUDEPATH}
1083 \o \l{qmake Variable Reference#LEXSOURCES}{LEXSOURCES}
1084 \o \l{qmake Variable Reference#LIBS}{LIBS}
1085 \o \l{qmake Variable Reference#MOC_DIR}{MOC_DIR}
1086 \o \l{qmake Variable Reference#OBJECTS_DIR}{OBJECTS_DIR}
1087 \o \l{qmake Variable Reference#QT}{QT}
1088 \o \l{qmake Variable Reference#RCC_DIR}{RCC_DIR}
1089 \o \l{qmake Variable Reference#REQUIRES}{REQUIRES}
1090 \o \l{qmake Variable Reference#RESOURCES}{RESOURCES}
1091 \o \l{qmake Variable Reference#SOURCES}{SOURCES}
1092 \o \l{qmake Variable Reference#SUBDIRS}{SUBDIRS}
1093 \o \l{qmake Variable Reference#TARGET}{TARGET}
1094 \o \l{qmake Variable Reference#TEMPLATE}{TEMPLATE}
1095 \o \l{qmake Variable Reference#TRANSLATIONS}{TRANSLATIONS}
1096 \o \l{qmake Variable Reference#UI_DIR}{UI_DIR}
1097 \o \l{qmake Variable Reference#UI_HEADERS_DIR}{UI_HEADERS_DIR}
1098 \o \l{qmake Variable Reference#UI_SOURCES_DIR}{UI_SOURCES_DIR}
1099 \o \l{qmake Variable Reference#VERSION}{VERSION}
1100 \o \l{qmake Variable Reference#YACCSOURCES}{YACCSOURCES}
1103 \section1 Environment Variables and Configuration
1105 The \l{Configuring qmake's Environment} chapter of this manual
1106 describes the environment variables that \l{qmake Manual#qmake}{\c qmake}
1107 uses when configuring the build process.
1111 \page qmake-variable-reference.html
1112 \title qmake Variable Reference
1113 \contentspage {qmake Manual}{Contents}
1114 \previouspage qmake Reference
1115 \nextpage qmake Function Reference
1117 \c{qmake}'s fundamental behavior is influenced by variable declarations that
1118 define the build process of each project. Some of these declare resources,
1119 such as headers and source files, that are common to each platform; others
1120 are used to customize the behavior of compilers and linkers on specific
1123 Platform-specific variables follow the naming pattern of the
1124 variables which they extend or modify, but include the name of the relevant
1125 platform in their name. For example, \c QMAKE_LIBS can be used to specify a list
1126 of libraries that a project needs to link against, and \c QMAKE_LIBS_X11 can be
1127 used to extend or override this list.
1132 \target BACKUP_REGISTRATION_FILE_MAEMO
1133 \section1 BACKUP_REGISTRATION_FILE_MAEMO
1135 \e {This is only used on the Maemo platform.}
1137 This variable is used to specify the backup registration file to use with
1138 \c enable_backup \c CONFIG value for Maemo platform. The default value is:
1139 \c{$$_PRO_FILE_PWD_/backup_registration/maemo/$$basename(TARGET).conf}.
1141 Unfortunately it is not possible to have a common registration file for Maemo like there is
1142 for Symbian, so the developer must always provide one if the platform default backup support is
1145 For documentation about how to create backup registration files and how the device
1146 backup works in general, see:
1147 (\l{http://wiki.maemo.org/Documentation/Maemo_5_Developer_Guide/Generic_Platform_Components/Using_Backup_Application}{Using Backup Application})
1149 \target BACKUP_REGISTRATION_FILE_SYMBIAN
1150 \section1 BACKUP_REGISTRATION_FILE_SYMBIAN
1152 \e {This is only used on the Symbian platform.}
1154 This variable is used to specify the backup registration file to use with
1155 \c enable_backup \c CONFIG value for Symbian platform. The default value is
1156 determined as follows:
1158 If a custom registration file \c{$$_PRO_FILE_PWD_/backup_registration/symbian/backup_registration.xml}
1159 exists, it is used. Otherwise, the common registration file \c{$$[QT_INSTALL_DATA]/mkspecs/common/symbian/backup_registration.xml}
1160 is used. This common registration file will define backing up of application binaries,
1161 resources, and all files under application private directory. Also note that \c{C:/Data}
1162 contents are backed up by default on Symbian devices, so no registration is needed for any
1165 For documentation about how to create backup registration files and how the device
1166 backup works in general, see:
1167 (\l{http://library.forum.nokia.com/index.jsp?topic=/S60_5th_Edition_Cpp_Developers_Library/GUID-35228542-8C95-4849-A73F-2B4F082F0C44/sdk/doc_source/guide/Connectivity-subsystem-guide/Connectivity/PC_Connectivity_How-To_Write_Backup_Aware_Software.html}{How-To Write Backup-aware Software})
1169 \target BLD_INF_RULES
1170 \section1 BLD_INF_RULES
1172 \e {This is only used on the Symbian platform.}
1174 Generic \c bld.inf file content can be specified with \c BLD_INF_RULES variables.
1175 The section of \c bld.inf file where each rule goes is appended to
1176 \c BLD_INF_RULES with a dot.
1180 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 152
1182 This will add the specified statements to the \c prj_exports section of the
1183 generated \c bld.inf file.
1185 It is also possible to add multiple rows in a single block. Each double
1186 quoted string will be placed on a new row in the generated \c bld.inf file.
1190 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 143
1192 Any rules you define will be added after automatically generated
1193 rules in each section.
1195 \note Content specified using \c BLD_INF_RULES is inserted as-is into the \c bld.inf
1196 file, so any rules that specify host side paths may not work correctly when doing
1202 The \c CONFIG variable specifies project configuration and
1203 compiler options. The values will be recognized internally by
1204 \l{qmake Manual#qmake}{\c qmake} and have special meaning. They are as follows.
1206 These \c CONFIG values control compilation flags:
1209 \header \o Option \o Description
1210 \row \o release \o The project is to be built in release mode.
1211 This is ignored if \c debug is also specified.
1212 \row \o debug \o The project is to be built in debug mode.
1213 \row \o debug_and_release \o The project is built in \e both debug and
1214 release modes. This can have some unexpected side effects (see
1215 below for more information).
1216 \row \o build_all \o If \c debug_and_release is specified, the project is
1217 built in both debug and release modes by default.
1218 \row \o ordered \o When using the \c subdirs template, this option
1219 specifies that the directories listed should be processed in the
1220 order in which they are given.
1221 \row \o precompile_header \o Enables support for the use of
1222 \l{Using Precompiled Headers}{precompiled headers} in projects.
1223 \row \o warn_on \o The compiler should output as many warnings as possible.
1224 This is ignored if \c warn_off is specified.
1225 \row \o warn_off \o The compiler should output as few warnings as possible.
1227 \row \o qt_debug \o Specifies that the project should be built against
1228 debug versions of the Qt libraries specified using the
1229 \l{#QT}{QT} variable.
1230 \row \o qt_release \o Specifies that the project should be built against
1231 release versions of the Qt libraries specified using the
1232 \l{#QT}{QT} variable.
1236 Since the \c debug option overrides the \c release option when both are
1237 defined in the \c CONFIG variable, it is necessary to use the
1238 \c debug_and_release option if you want to allow both debug and release
1239 versions of a project to be built. In such a case, the Makefile that
1240 \l{qmake Manual#qmake}{\c qmake} generates includes a rule that builds both
1241 versions, and this can be invoked in the following way:
1243 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 24
1245 When linking a library, \l{qmake Manual#qmake}{\c qmake} relies on the
1246 underlying platform to know what other libraries this library links
1247 against. However, if linking statically, \l{qmake Manual#qmake}{\c qmake}
1248 will not get this information unless we use the following \c CONFIG
1252 \header \o Option \o Description
1253 \row \o create_prl \o This option enables
1254 \l{qmake Manual#qmake}{\c qmake} to track these dependencies. When this
1255 option is enabled, \l{qmake Manual#qmake}{\c qmake} will create a file
1256 ending in \c .prl which will save meta-information about the library
1257 (see \l{LibDepend}{Library Dependencies} for more info).
1258 \row \o link_prl \o When this is enabled,
1259 \l{qmake Manual#qmake}{\c qmake} will process all libraries linked to
1260 by the application and find their meta-information(see
1261 \l{LibDepend}{Library Dependencies} for more info).
1264 Please note that \c create_prl is required when \e {building} a
1265 static library, while \c link_prl is required when \e {using} a
1268 On Windows (or if Qt is configured with \c{-debug_and_release}, adding the
1269 \c build_all option to the \c CONFIG variable makes this rule the default
1270 when building the project, and installation targets will be created for
1271 both debug and release builds.
1273 Additionally, adding \c debug_and_release to the \c CONFIG variable will
1274 cause both \c debug and \c release to be defined in the contents of
1275 \c CONFIG. When the project file is processed, the
1276 \l{qmake Advanced Usage#Scopes}{scopes} that test for each value will be
1277 processed for \e both debug and release modes. The \c{build_pass} variable
1278 will be set for each of these mode, and you can test for this to perform
1279 build-specific tasks. For example:
1281 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 25
1283 As a result, it may be useful to define mode-specific variables, such as
1284 \l{#QMAKE_LFLAGS_RELEASE}{QMAKE_LFLAGS_RELEASE}, instead of general
1285 variables, such as \l{#QMAKE_LFLAGS}{QMAKE_LFLAGS}, where possible.
1287 The following options define the application/library type:
1290 \header \o Option \o Description
1291 \row \o qt \o The target is a Qt application/library and requires the Qt
1292 library and header files. The proper include and library paths for the
1293 Qt library will automatically be added to the project. This is defined
1294 by default, and can be fine-tuned with the \c{\l{#qt}{QT}} variable.
1295 \row \o thread \o The target is a multi-threaded application or library. The
1296 proper defines and compiler flags will automatically be added to
1298 \row \o x11 \o The target is a X11 application or library. The proper
1299 include paths and libraries will automatically be added to the
1301 \row \o windows \o The target is a Win32 window application (app only). The
1302 proper include paths, compiler flags and libraries will
1303 automatically be added to the project.
1304 \row \o console \o The target is a Win32 console application (app only). The
1305 proper include paths, compiler flags and libraries will
1306 automatically be added to the project.
1307 \row \o shared \o{1,3} The target is a shared object/DLL. The proper
1308 include paths, compiler flags and libraries will automatically be
1309 added to the project. Note that \c dll can also be used on all platforms;
1310 a shared library file with the appropriate suffix for the target platform
1311 (dll, so, dylib) will be created.
1314 \row \o static \o{1,2} The target is a static library (lib only). The proper
1315 compiler flags will automatically be added to the project.
1316 \row \o staticlib \o
1317 \row \o plugin \o The target is a plugin (lib only). This enables dll as well.
1318 \row \o designer \o The target is a plugin for \QD.
1319 \row \o uic3 \o Configures qmake to run uic3 on the content of \c FORMS3 if
1320 defined; otherwise the contents of \c FORMS will be processed instead.
1321 \row \o no_lflags_merge \o Ensures that the list of libraries stored in the
1322 \c LIBS variable is not reduced to a list of unique values before it is used.
1323 \row \o resources \o Configures qmake to run rcc on the content of \c RESOURCES
1327 These options are used to set the compiler flags:
1330 \header \o Option \o Description
1331 \row \o 3dnow \o AMD 3DNow! instruction support is enabled.
1332 \row \o exceptions \o Exception support is enabled.
1333 \row \o mmx \o Intel MMX instruction support is enabled.
1334 \row \o rtti \o RTTI support is enabled.
1335 \row \o stl \o STL support is enabled.
1336 \row \o sse \o SSE support is enabled.
1337 \row \o sse2 \o SSE2 support is enabled.
1340 These options define specific features on Windows only:
1343 \header \o Option \o Description
1344 \row \o flat \o When using the vcapp template this will put all the source
1345 files into the source group and the header files into the header group
1346 regardless of what directory they reside in. Turning this
1347 option off will group the files within the source/header group depending
1348 on the directory they reside. This is turned on by default.
1349 \row \o embed_manifest_dll \o Embeds a manifest file in the DLL created
1350 as part of a library project.
1351 \row \o embed_manifest_exe \o Embeds a manifest file in the DLL created
1352 as part of an application project.
1353 \row \o incremental \o Used to enable or disable incremental linking in Visual
1354 C++, depending on whether this feature is enabled or disabled by default.
1357 See \l{qmake Platform Notes#Visual Studio 2005 Manifest Files}{qmake Platform Notes}
1358 for more information on the options for embedding manifest files.
1360 These options only have an effect on Mac OS X:
1363 \header \o Option \o Description
1364 \row \o ppc \o Builds a PowerPC binary.
1365 \row \o x86 \o Builds an i386 compatible binary.
1366 \row \o app_bundle \o Puts the executable into a bundle (this is the default).
1367 \row \o lib_bundle \o Puts the library into a library bundle.
1370 The build process for bundles is also influenced by
1371 the contents of the \l{#QMAKE_BUNDLE_DATA}{QMAKE_BUNDLE_DATA} variable.
1373 These options only have an effect on the Symbian platform:
1376 \header \o Option \o Description
1377 \row \o stdbinary \o Builds an Open C binary (i.e. STDDLL, STDEXE, or STDLIB,
1378 depending on the target binary type.)
1379 \row \o no_icon \o Doesn't generate resources needed for displaying an icon
1380 for executable in application menu (app only).
1381 \row \o symbian_test \o Places mmp files and extension makefiles under
1382 test sections in generated bld.inf instead of their regular sections.
1383 Note that this only affects automatically generated bld.inf content;
1384 the content added via \c BLD_INF_RULES variable is not affected.
1385 \row \o localize_deployment \o Makes \c lupdate tool add fields for
1386 application captions and package file names into generated \c{.ts}
1387 files. Qmake generates properly localized \c{.loc} and \c{.pkg} files
1388 based on available translations. Translation file name bodies must
1389 end with underscore and the language code for deployment localization
1390 to work. E.g. \c{myapp_en.ts}.
1391 \bold{Note:} All languages supported by Qt are not supported by Symbian,
1392 so some \c{.ts} files may be ignored by qmake.
1395 These options only have an effect on Symbian and Maemo platforms:
1398 \header \o Option \o Description
1399 \row \o enable_backup \o Generates deployment for backup registration file
1400 to enable backing up the application during device backup.
1401 See \l{#BACKUP_REGISTRATION_FILE_MAEMO}{BACKUP_REGISTRATION_FILE_MAEMO}
1402 and \l{#BACKUP_REGISTRATION_FILE_SYMBIAN}{BACKUP_REGISTRATION_FILE_SYMBIAN}
1403 for more information about backup.
1406 These options have an effect on Linux/Unix platforms:
1409 \header \o Option \o Description
1410 \row \o largefile \o Includes support for large files.
1411 \row \o separate_debug_info \o Puts debugging information for libraries in
1415 The \c CONFIG variable will also be checked when resolving scopes. You may
1416 assign anything to this variable.
1420 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 26
1425 \l{qmake Manual#qmake}{\c qmake} adds the values of this variable as
1426 compiler C preprocessor macros (-D option).
1430 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 27
1435 \e {This is only used on Windows when using the \c app template,
1436 and on Symbian when building a shared DLL}.
1438 Specifies a \c .def file to be included in the project. On Symbian
1439 a directory may be specified instead, in which case the real files
1440 will be located under the standard Symbian directories \c bwins and
1444 \section1 DEPENDPATH
1446 This variable contains the list of all directories to look in to
1447 resolve dependencies. This will be used when crawling through
1451 \section1 DEPLOYMENT
1453 \e {This is only used on Windows CE and the Symbian platform.}
1455 Specifies which additional files will be deployed. Deployment means the
1456 transfer of files from the development system to the target device or
1459 Files can be deployed by either creating a Visual Studio project or using
1460 the \l {Using QTestLib remotely on Windows CE}{cetest} executable.
1464 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 28
1466 This will upload all PNG images in \c path to the same directory your
1467 build target will be deployed to.
1469 The default deployment target path for Windows CE is
1470 \c{%CSIDL_PROGRAM_FILES%\target}, which usually gets expanded to
1471 \c{\Program Files\target}. For the Symbian platform, the default target
1472 is the application private directory on the drive it is installed to.
1474 It is also possible to specify multiple \c sources to be deployed on
1475 target \c paths. In addition, different variables can be used for
1476 deployment to different directories.
1480 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 29
1482 \note In Windows CE all linked Qt libraries will be deployed to the path
1483 specified by \c{myFiles.path}. On Symbian platform all libraries and executables
1484 will always be deployed to the \\sys\\bin of the installation drive.
1486 Since the Symbian platform build system automatically moves binaries to certain
1487 directories under the epoc32 directory, custom plugins, executables or
1488 dynamically loadable libraries need special handling. When deploying
1489 extra executables or dynamically loadable libraries, the target path
1490 must specify \\sys\\bin. For plugins, the target path must specify the
1491 location where the plugin stub will be deployed to (see the
1492 \l{How to Create Qt Plugins} document for more information about plugins).
1493 If the binary cannot be found from the indicated source path,
1494 the directory Symbian build process moves the executables to is
1495 searched, e.g. \\epoc32\\release\\armv5\\urel.
1499 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 128
1501 On the Symbian platform, generic PKG file content can also be specified with this
1502 variable. You can use either \c pkg_prerules or \c pkg_postrules to
1503 pass raw data to PKG file. The strings in \c pkg_prerules are added before
1504 package-body and \c pkg_postrules after. \c pkg_prerules is used for
1505 defining vendor information, dependencies, custom package headers, and the
1506 like, while \c pkg_postrules is used for custom file deployment and
1507 embedded sis directives.
1508 The strings defined in \c pkg_postrules or \c pkg_prerules are not parsed
1509 by qmake, so they should be in a format understood by Symbian package
1511 Please consult the Symbian platform documentation for correct syntax.
1513 For example, to deploy DLL and add a new dependency:
1515 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 140
1517 Please note that \c pkg_prerules can also replace default statements in
1518 pkg file. If no pkg_prerules is defined, qmake makes sure that PKG file
1519 syntax is correct and it contains all mandatory statements such as:
1522 \o languages, for example \BR
1524 \o package-header, for example \BR
1525 #{"MyApp-EN", "MyApp-FR"}, (0x1000001F), 1, 2, 3, TYPE=SA
1526 \o localized and unique vendor, for example \BR
1527 %{"Vendor-EN", ..., "Vendor-FR"}
1528 :"Unique vendor name"
1531 If you decide to override any of these statements, you need to pay
1532 attention that also other statements stay valid. For example if you
1533 override languages statement, you must override also package-header
1534 statement and all other statements which are language specific.
1536 \note Custom deployments specified using \c pkg_postrules are inserted
1537 as-is into the \c PKG file, so any rules that specify host side paths may not
1538 work correctly when doing a shadow build.
1540 On the Symbian platform, three separate PKG files are generated:
1543 \o <app>_template.pkg - For application SIS file. Rules suffix: \c{.main}
1544 \o <app>_installer.pkg - For smart installer SIS file. Rules suffix: \c{.installer}
1545 \o <app>_stub.pkg - For ROM stubs. Rules suffix: \c{.stub}
1548 \c pkg_prerules and \c pkg_postrules given without rules suffix will
1549 intelligently apply to each of these files, but rules can also be
1550 targeted to only one of above files by appending listed rules suffix
1551 to the variable name:
1553 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 153
1555 On the Symbian platform, the \c default_deployment item specifies
1556 default platform and package dependencies. Those dependencies can be
1557 selectively disabled if alternative dependencies need to be defined
1558 - e.g. if a specific device is required to run the application or
1559 more languages need to be supported by the package file. The supported
1560 \c default_deployment rules that can be disabled are:
1564 \o pkg_depends_webkit
1565 \o pkg_platform_dependencies
1570 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 141
1572 On the Symbian platform, a default deployment is generated for all
1573 application projects. You can modify the autogenerated default
1574 deployment via following \c DEPLOYMENT variable values:
1577 \o default_bin_deployment - Application executable
1578 \o default_resource_deployment - Application resources, including icon
1579 \o default_reg_deployment - Application registration file
1584 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 154
1586 This will entirely remove the default application deployment.
1588 On the Symbian platform, you can specify file specific install options
1589 with \c{.flags} modifier. Please consult the Symbian platform documentation
1590 for supported options.
1594 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 155
1596 This will show a message box that gives user an option to cancel the
1597 installation and then automatically runs the application after
1598 installation is complete.
1600 \note Automatically running the applications after install may require signing
1601 the package with better than self-signed certificate, depending on the phone model.
1602 Additionally, some tools such as Runonphone may not work properly with sis
1603 packages that automatically run the application upon install.
1605 On the Symbian platform, the default package name and the default name that
1606 appears in application menu is derived from the \c TARGET variable.
1607 Often the default is not optimal for displaying to end user. To set a better
1608 display name for these purposes, use \c{DEPLOYMENT.display_name} variable:
1610 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 156
1612 On the Symbian platform, you can use \c{DEPLOYMENT.installer_header}
1613 variable to generate smart installer wrapper for your application.
1614 If you specify just UID of the installer package as the value, then
1615 installer package name and version will be autogenerated:
1617 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 146
1619 If autogenerated values are not suitable, you can also specify the sis
1620 header yourself using this variable:
1622 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 147
1624 \target DEPLOYMENT_PLUGIN
1625 \section1 DEPLOYMENT_PLUGIN
1627 \e {This is only used on Windows CE and the Symbian platform.}
1629 This variable specifies the Qt plugins that will be deployed. All plugins
1630 available in Qt can be explicitly deployed to the device. See
1631 \l{Static Plugins}{Static Plugins} for a complete list.
1633 \note In Windows CE, No plugins will be deployed automatically.
1634 If the application depends on plugins, these plugins have to be specified
1637 \note On the Symbian platform, all plugins supported by this variable
1638 will be deployed by default with Qt libraries, so generally using this
1639 variable is not needed.
1643 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 142
1645 This will upload the jpeg imageformat plugin to the plugins directory
1646 on the Windows CE device.
1651 Specifies where to put the \l{#TARGET}{target} file.
1655 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 30
1657 \target DESTDIR_TARGET
1658 \section1 DESTDIR_TARGET
1660 This variable is set internally by \l{qmake Manual#qmake}{\c qmake}, which
1661 is basically the \c DESTDIR variable with the \c TARGET variable appened at
1662 the end. The value of this variable is typically handled by
1663 \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
1664 needs to be modified.
1667 \section1 DLLDESTDIR
1669 Specifies where to copy the \l{#TARGET}{target} dll.
1674 This variable contains a list of files to be included in the dist
1675 target. This feature is supported by UnixMake specs only.
1679 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 31
1681 \target DSP_TEMPLATE
1682 \section1 DSP_TEMPLATE
1684 This variable is set internally by \l{qmake Manual#qmake}{\c qmake}, which
1685 specifies where the dsp template file for basing generated dsp files is
1686 stored. The value of this variable is typically handled by
1687 \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
1688 needs to be modified.
1693 This variable specifies the UI files (see \link
1694 designer-manual.html Qt Designer \endlink) to be processed through \c uic
1695 before compiling. All dependencies, headers and source files required
1696 to build these UI files will automatically be added to the project.
1700 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 32
1702 If FORMS3 is defined in your project, then this variable must contain
1703 forms for uic, and not uic3. If CONFIG contains uic3, and FORMS3 is not
1704 defined, the this variable must contain only uic3 type forms.
1709 This variable specifies the old style UI files to be processed
1710 through \c uic3 before compiling, when \c CONFIG contains uic3.
1711 All dependencies, headers and source files required to build these
1712 UI files will automatically be added to the project.
1716 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 33
1721 Specifies the GUID that is set inside a \c{.vcproj} file. The GUID is
1722 usually randomly determined. However, should you require a fixed GUID,
1723 it can be set using this variable.
1725 This variable is specific to \c{.vcproj} files only; it is ignored
1731 Defines the header files for the project.
1733 \l{qmake Manual#qmake}{\c qmake} will generate dependency information (unless
1734 \c -nodepend is specified on the \l{Running qmake#Commands}{command line})
1735 for the specified headers. \l{qmake Manual#qmake}{\c qmake} will also
1736 automatically detect if \c moc is required by the classes in these headers,
1737 and add the appropriate dependencies and files to the project for generating
1738 and linking the moc files.
1742 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 34
1744 See also \l{#SOURCES}{SOURCES}.
1749 This variable is used only in MAC and the Symbian platform to set the application icon.
1750 Please see \l{Setting the Application Icon}{the application icon documentation}
1751 for more information.
1754 \section1 INCLUDEPATH
1756 This variable specifies the #include directories which should be
1757 searched when compiling the project.
1761 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 35
1763 To specify a path containing spaces, quote the path using the technique
1764 mentioned in the \l{qmake Project Files#Whitespace}{qmake Project Files}
1767 \snippet doc/src/snippets/qmake/spaces.pro quoting include paths with spaces
1772 This variable contains a list of resources that will be installed when
1773 \c{make install} or a similar installation procedure is executed. Each
1774 item in the list is typically defined with attributes that provide
1775 information about where it will be installed.
1777 For example, the following \c{target.path} definition describes where the
1778 build target will be installed, and the \c INSTALLS assignment adds the
1779 build target to the list of existing resources to be installed:
1781 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 36
1783 Note that \l{qmake Manual#qmake}{\c qmake} will skip files that are
1784 executable. If you need to install executable files, you can unset the
1785 files' executable flags.
1787 Note that \c qmake will skip files that are executable. If you need to install
1788 executable files, you can unset the files' executable flags.
1793 This variable contains a list of lex implementation files. The value
1794 of this variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or
1795 \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
1798 \section1 LEXOBJECTS
1800 This variable contains the names of intermediate lex object
1801 files.The value of this variable is typically handled by
1802 \l{qmake Manual#qmake}{\c qmake} and rarely needs to be modified.
1805 \section1 LEXSOURCES
1807 This variable contains a list of lex source files. All
1808 dependencies, headers and source files will automatically be added to
1809 the project for building these lex files.
1813 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 37
1818 This variable contains a list of libraries to be linked into the project.
1819 You can use the Unix \c -l (library) and -L (library path) flags and qmake
1820 will do the correct thing with these libraries on Windows and the
1821 Symbian platform (namely this means passing the full path of the library to
1822 the linker). The only limitation to this is the library must exist, for
1823 qmake to find which directory a \c -l lib lives in.
1827 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 38
1829 \bold{Note:} On Windows, specifying libraries with the \c{-l} option
1830 will cause the library with the highest version
1831 number to be used. For example, \c{math2.lib} could potentially be used
1832 instead of \c{math.lib}. To avoid this ambiguity, we recommend that you
1833 explicitly specify the library to be used by including the \c{.lib}
1834 file name suffix, as in the example above.
1836 To specify a path containing spaces, quote the path using the technique
1837 mentioned in the \l{qmake Project Files#Whitespace}{qmake Project Files}
1840 \snippet doc/src/snippets/qmake/spaces.pro quoting library paths with spaces
1842 \bold{Note:} On the Symbian platform, the build system makes a
1843 distinction between shared and
1844 static libraries. In most cases, qmake will figure out which library you
1845 are refering to, but in some cases you may have to specify it explicitly to
1846 get the expected behavior. This typically happens if you are building a
1847 library and using it in the same project. To specify that the library is
1848 either shared or static, add a ".dll" or ".lib" suffix, respectively, to the
1851 By default, the list of libraries stored in \c LIBS is reduced to a list of
1852 unique names before it is used. To change this behavior, add the
1853 \c no_lflags_merge option to the \c CONFIG variable:
1855 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 39
1857 \target LITERAL_HASH
1858 \section1 LITERAL_HASH
1860 This variable is used whenever a literal hash character (\c{#}) is needed in
1861 a variable declaration, perhaps as part of a file name or in a string passed
1862 to some external application.
1866 \snippet doc/src/snippets/qmake/comments.pro 1
1868 By using \c LITERAL_HASH in this way, the \c # character can be used
1869 to construct a URL for the \c message() function to print to the console.
1874 This variable specifies the name of the Makefile which
1875 \l{qmake Manual#qmake}{\c qmake} should use when outputting the dependency
1876 information for building a project. The value of this variable is
1877 typically handled by \l{qmake Manual#qmake}{\c qmake} or
1878 \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
1880 \bold{Note:} On the Symbian platform, this variable is ignored.
1882 \bold{Note:} On the Symbian platform, this variable is ignored.
1884 \target MAKEFILE_GENERATOR
1885 \section1 MAKEFILE_GENERATOR
1887 This variable contains the name of the Makefile generator to use
1888 when generating a Makefile. The value of this variable is typically
1889 handled internally by \l{qmake Manual#qmake}{\c qmake} and rarely needs to
1895 \e {This is only used on the Symbian platform.}
1897 Generic MMP file content can be specified with this variable.
1901 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 137
1903 This will add the specified statement to the end of the generated MMP file.
1905 It is also possible to add multiple rows in a single block. Each double
1906 quoted string will be placed on a new row in the generated MMP file.
1910 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 138
1912 If you need to include a hash (\c{#}) character inside the
1913 \c MMP_RULES statement, it can be done with the variable
1914 \c LITERAL_HASH as follows:
1916 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 139
1918 There is also a convenience function for adding conditional rules
1919 called \c{addMMPRules}. Suppose you need certain functionality
1920 to require different library depending on architecture. This
1921 can be specified with \c{addMMPRules} as follows:
1923 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 148
1925 \note You should not use this variable to add MMP statements that are
1926 explicitly supported by their own variables, such as
1927 \c TARGET.EPOCSTACKSIZE.
1928 Doing so could result in duplicate statements in the MMP file.
1930 \note Content specified using \c MMP_RULES is inserted as-is into the \c MMP
1931 file, so any rules that specify host side paths may not work correctly when doing
1937 This variable specifies the directory where all intermediate moc
1938 files should be placed.
1942 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 40
1947 This variable is generated from the \link #SOURCES SOURCES
1948 \endlink variable. The extension of each source file will have been
1949 replaced by .o (Unix) or .obj (Win32). The value of this variable is
1950 typically handled by \l {qmake Manual#qmake}{\c qmake} or
1951 \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
1954 \section1 OBJECTS_DIR
1956 This variable specifies the directory where all intermediate
1957 objects should be placed.
1961 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 41
1966 This variable is set by \l{qmake Manual#qmake}{\c qmake} if files can be
1967 found that contain the Q_OBJECT macro. \c OBJMOC contains the name of all
1968 intermediate moc object files. The value of this variable is typically
1969 handled by \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf}
1970 and rarely needs to be modified.
1972 \target POST_TARGETDEPS
1973 \section1 POST_TARGETDEPS
1975 All libraries that the \l{#TARGET}{target} depends on can be
1976 listed in this variable. Some backends do not support this, these include
1977 MSVC Dsp, and ProjectBuilder .pbproj files. Generally this is supported
1978 internally by these build tools, this is useful for explicitly listing
1979 dependant static libraries.
1981 This list will go after all builtin (and \link #PRE_TARGETDEPS
1982 $$PRE_TARGETDEPS \endlink) dependencies.
1984 \target PRE_TARGETDEPS
1985 \section1 PRE_TARGETDEPS
1987 All libraries that the \l{#TARGET}{target} depends on can be
1988 listed in this variable. Some backends do not support this, these include
1989 MSVC Dsp, and ProjectBuilder .pbproj files. Generally this is supported
1990 internally by these build tools, this is useful for explicitly listing
1991 dependant static libraries.
1993 This list will go before all builtin dependencies.
1995 \target PRECOMPILED_HEADER
1996 \section1 PRECOMPILED_HEADER
1998 This variable indicates the header file for creating a precompiled
1999 header file, to increase the compilation speed of a project.
2000 Precompiled headers are currently only supported on some platforms
2001 (Windows - all MSVC project types, Mac OS X - Xcode, Makefile,
2002 Unix - gcc 3.3 and up).
2004 On other platforms, this variable has different meaning, as noted
2007 This variable contains a list of header files that require some
2008 sort of pre-compilation step (such as with moc). The value of this
2009 variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or
2010 \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
2015 The \c PWD variable specifies the full path leading to the directory
2016 containing the current file being parsed. This can be useful
2017 to refer to files within the source tree when writing project files to
2018 support shadow builds.
2020 See also \l{#_PRO_FILE_PWD_}{_PRO_FILE_PWD_}.
2022 \note IN_PWD is an alias for PWD.
2024 \note Function calls have no effect on the value of PWD. PWD will refer to
2025 the path of the calling file.
2030 This variable contains the full path leading to the directory where
2031 \l{qmake Manual#qmake}{\c qmake} places the generated Makefile.
2033 \target QMAKE_systemvariable
2036 This variable contains the name of the \l{qmake Manual#qmake}{\c qmake}
2037 program itself and is placed in generated Makefiles. The value of this
2038 variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or
2039 \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
2041 \target QMAKESPEC_systemvariable
2044 This variable contains the name of the \l{qmake Manual#qmake}{\c qmake}
2045 configuration to use when generating Makefiles. The value of this variable
2046 is typically handled by \l{qmake Manual#qmake}{\c qmake} and rarely needs
2049 Use the \c{QMAKESPEC} environment variable to override the
2050 \l{qmake Manual#qmake}{\c qmake} configuration. Note that, due to the way
2051 \l{qmake Manual#qmake}{\c qmake} reads project files, setting the
2052 \c{QMAKESPEC} environment variable from within a project file will have no
2055 \target QMAKE_APP_FLAG
2056 \section1 QMAKE_APP_FLAG
2058 This variable is empty unless the \c app
2059 \l{#TEMPLATE}{TEMPLATE} is specified. The value of this
2060 variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or
2061 \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. Use the
2064 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 42
2066 \target QMAKE_APP_OR_DLL
2067 \section1 QMAKE_APP_OR_DLL
2069 This variable is empty unless the \c app or \c dll \l{#TEMPLATE}{TEMPLATE}
2070 is specified. The value of this variable is typically handled by
2071 \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
2072 needs to be modified.
2074 \target QMAKE_AR_CMD
2075 \section1 QMAKE_AR_CMD
2077 \e {This is used on Unix platforms only.}
2079 This variable contains the command for invoking the program which creates,
2080 modifies and extracts archives. The value of this variable is typically
2081 handled by \l{qmake Manual#qmake}{\c qmake} or
2082 \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
2084 \target QMAKE_BUNDLE_DATA
2085 \section1 QMAKE_BUNDLE_DATA
2087 This variable is used to hold the data that will be installed with a library
2088 bundle, and is often used to specify a collection of header files.
2090 For example, the following lines add \c path/to/header_one.h
2091 and \c path/to/header_two.h to a group containing information about the
2092 headers supplied with the framework:
2094 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 43
2096 The last line adds the information about the headers to the collection of
2097 resources that will be installed with the library bundle.
2099 Library bundles are created when the \c lib_bundle option is added to the
2100 \l{#CONFIG}{CONFIG} variable.
2102 See \l{qmake Platform Notes#Creating Frameworks}{qmake Platform Notes} for
2103 more information about creating library bundles.
2105 \e{This is used on Mac OS X only.}
2107 \section1 QMAKE_BUNDLE_EXTENSION
2109 This variable defines the extension to be used for library bundles.
2110 This allows frameworks to be created with custom extensions instead of the
2111 standard \c{.framework} directory name extension.
2113 For example, the following definition will result in a framework with the
2114 \c{.myframework} extension:
2116 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 44
2118 \e{This is used on Mac OS X only.}
2122 This variable specifies the C compiler that will be used when building
2123 projects containing C source code. Only the file name of the compiler
2124 executable needs to be specified as long as it is on a path contained
2125 in the \c PATH variable when the Makefile is processed.
2127 \target QMAKE_CFLAGS_DEBUG
2128 \section1 QMAKE_CFLAGS_DEBUG
2130 This variable contains the flags for the C compiler in debug mode. The
2131 value of this variable is typically handled by
2132 \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
2133 needs to be modified.
2135 \target QMAKE_CFLAGS_MT
2136 \section1 QMAKE_CFLAGS_MT
2138 This variable contains the compiler flags for creating a
2139 multi-threaded application or when the version of Qt that you link
2140 against is a multi-threaded statically linked library. The value of
2141 this variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or
2142 \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
2144 \target QMAKE_CFLAGS_MT_DBG
2145 \section1 QMAKE_CFLAGS_MT_DBG
2147 This variable contains the compiler flags for creating a debuggable
2148 multi-threaded application or when the version of Qt that you link
2149 against is a debuggable multi-threaded statically linked library. The
2150 value of this variable is typically handled by
2151 \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
2152 needs to be modified.
2154 \target QMAKE_CFLAGS_MT_DLL
2155 \section1 QMAKE_CFLAGS_MT_DLL
2157 \e {This is used on Windows only.}
2159 This variable contains the compiler flags for creating a
2160 multi-threaded dll or when the version of Qt that you link
2161 against is a multi-threaded dll. The value of this variable is typically
2162 handled by \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf}
2163 and rarely needs to be modified.
2165 \target QMAKE_CFLAGS_MT_DLLDBG
2166 \section1 QMAKE_CFLAGS_MT_DLLDBG
2168 \e {This is used on Windows only.}
2170 This variable contains the compiler flags for creating a debuggable
2171 multi-threaded dll or when the version of Qt that you link
2172 against is a debuggable multi-threaded statically linked library.
2173 The value of this variable is typically handled by
2174 \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
2175 needs to be modified.
2177 \target QMAKE_CFLAGS_RELEASE
2178 \section1 QMAKE_CFLAGS_RELEASE
2180 This variable contains the compiler flags for creating a non-debuggable
2181 application. The value of this variable is typically
2182 handled by \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf}
2183 and rarely needs to be modified.
2185 \target QMAKE_CFLAGS_SHLIB
2186 \section1 QMAKE_CFLAGS_SHLIB
2188 \e {This is used on Unix platforms only.}
2190 This variable contains the compiler flags for creating a shared
2191 library. The value of this variable is typically handled by
2192 \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
2193 needs to be modified.
2195 \target QMAKE_CFLAGS_THREAD
2196 \section1 QMAKE_CFLAGS_THREAD
2198 This variable contains the compiler flags for creating a multi-threaded
2199 application. The value of this variable is typically handled by
2200 \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
2201 needs to be modified.
2203 \target QMAKE_CFLAGS_WARN_OFF
2204 \section1 QMAKE_CFLAGS_WARN_OFF
2206 This variable is not empty if the warn_off
2207 \l{#CONFIG}{CONFIG} option is specified. The value of this
2208 variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or
2209 \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
2211 \target QMAKE_CFLAGS_WARN_ON
2212 \section1 QMAKE_CFLAGS_WARN_ON
2214 This variable is not empty if the warn_on \l{#CONFIG}{CONFIG} option is
2215 specified. The value of this variable is typically handled by
2216 \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
2217 needs to be modified.
2220 \section1 QMAKE_CLEAN
2222 This variable contains any files which are not generated files (such as moc and uic
2223 generated files) and object files that should be removed when using "make clean".
2227 This variable specifies the C++ compiler that will be used when building
2228 projects containing C++ source code. Only the file name of the compiler
2229 executable needs to be specified as long as it is on a path contained
2230 in the \c PATH variable when the Makefile is processed.
2232 \section1 QMAKE_CXXFLAGS
2234 This variable contains the C++ compiler flags that are used when building
2235 a project. The value of this variable is typically handled by
2236 \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
2237 needs to be modified. The flags specific to debug and release modes can be
2238 adjusted by modifying the \c QMAKE_CXXFLAGS_DEBUG and
2239 \c QMAKE_CXXFLAGS_RELEASE variables, respectively.
2241 \bold{Note:} On the Symbian platform, this variable can be used to pass
2242 architecture specific options to each compiler in the Symbian build system.
2245 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 131
2247 For more information, see
2248 \l{qmake Platform Notes#Compiler specific options}{qmake Platform Notes}.
2250 \target QMAKE_CXXFLAGS_DEBUG
2251 \section1 QMAKE_CXXFLAGS_DEBUG
2253 This variable contains the C++ compiler flags for creating a debuggable
2254 application. The value of this variable is typically handled by
2255 \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
2256 needs to be modified.
2258 \target QMAKE_CXXFLAGS_MT
2259 \section1 QMAKE_CXXFLAGS_MT
2261 This variable contains the C++ compiler flags for creating a multi-threaded
2262 application. The value of this variable is typically handled by
2263 \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
2264 needs to be modified.
2266 \target QMAKE_CXXFLAGS_MT_DBG
2267 \section1 QMAKE_CXXFLAGS_MT_DBG
2269 This variable contains the C++ compiler flags for creating a debuggable
2270 multi-threaded application. The value of this variable is typically handled
2271 by \l{qmake Manual#qmake}{\c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely
2272 needs to be modified.
2274 \target QMAKE_CXXFLAGS_MT_DLL
2275 \section1 QMAKE_CXXFLAGS_MT_DLL
2277 \c {This is used on Windows only.}
2279 This variable contains the C++ compiler flags for creating a multi-threaded
2280 dll. The value of this variable is typically handled by
2281 \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
2282 needs to be modified.
2284 \target QMAKE_CXXFLAGS_MT_DLLDBG
2285 \section1 QMAKE_CXXFLAGS_MT_DLLDBG
2287 \c {This is used on Windows only.}
2289 This variable contains the C++ compiler flags for creating a multi-threaded
2290 debuggable dll. The value of this variable is typically handled by
2291 \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
2292 needs to be modified.
2294 \target QMAKE_CXXFLAGS_RELEASE
2295 \section1 QMAKE_CXXFLAGS_RELEASE
2297 This variable contains the C++ compiler flags for creating an application.
2298 The value of this variable is typically handled by
2299 \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
2300 needs to be modified.
2302 \target QMAKE_CXXFLAGS_SHLIB
2303 \section1 QMAKE_CXXFLAGS_SHLIB
2305 This variable contains the C++ compiler flags for creating a shared library.
2306 The value of this variable is typically handled by
2307 \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
2308 needs to be modified.
2310 \target QMAKE_CXXFLAGS_THREAD
2311 \section1 QMAKE_CXXFLAGS_THREAD
2313 This variable contains the C++ compiler flags for creating a multi-threaded
2314 application. The value of this variable is typically handled by
2315 \l{qmake Manual#qmake}{\c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely
2316 needs to be modified.
2318 \target QMAKE_CXXFLAGS_WARN_OFF
2319 \section1 QMAKE_CXXFLAGS_WARN_OFF
2321 This variable contains the C++ compiler flags for suppressing compiler
2322 warnings. The value of this variable is typically handled by
2323 \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
2324 needs to be modified.
2326 \target QMAKE_CXXFLAGS_WARN_ON
2327 \section1 QMAKE_CXXFLAGS_WARN_ON
2329 This variable contains C++ compiler flags for generating compiler warnings.
2330 The value of this variable is typically handled by
2331 \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
2332 needs to be modified.
2334 \target QMAKE_DISTCLEAN
2335 \section1 QMAKE_DISTCLEAN
2337 This variable removes extra files upon the invocation of \c{make distclean}.
2339 \target QMAKE_EXTENSION_SHLIB
2340 \section1 QMAKE_EXTENSION_SHLIB
2342 This variable contains the extention for shared libraries. The value of
2343 this variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or
2344 \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
2346 Note that platform-specific variables that change the extension will override
2347 the contents of this variable.
2349 \section1 QMAKE_EXT_MOC
2351 This variable changes the extention used on included moc files.
2353 See also \l{Configuring qmake's Environment#Extensions}{File Extensions}.
2355 \section1 QMAKE_EXT_UI
2357 This variable changes the extention used on /e Designer UI files.
2359 See also \l{Configuring qmake's Environment#Extensions}{File Extensions}.
2361 \section1 QMAKE_EXT_PRL
2363 This variable changes the extention used on created PRL files.
2365 See also \l{Configuring qmake's Environment#Extensions}{File Extensions},
2366 \l{Configuring qmake's Environment#libdepend}{Library Dependencies}.
2368 \section1 QMAKE_EXT_LEX
2370 This variable changes the extention used on files given to lex.
2372 See also \l{Configuring qmake's Environment#Extensions}{File Extensions},
2373 \l{#LEXSOURCES}{LEXSOURCES}.
2375 \section1 QMAKE_EXT_YACC
2376 This variable changes the extention used on files given to yacc.
2378 See also \l{Configuring qmake's Environment#Extensions}{File Extensions},
2379 \l{#YACCSOURCES}{YACCSOURCES}.
2381 \section1 QMAKE_EXT_OBJ
2383 This variable changes the extention used on generated object files.
2385 See also \l{Configuring qmake's Environment#Extensions}{File Extensions}.
2387 \section1 QMAKE_EXT_CPP
2389 This variable changes the interpretation of all suffixes in this
2390 list of values as files of type C++ source code.
2392 See also \l{Configuring qmake's Environment#Extensions}{File Extensions}.
2394 \section1 QMAKE_EXT_H
2396 This variable changes the interpretation of all suffixes in this
2397 list of values as files of type C header files.
2399 See also \l{Configuring qmake's Environment#Extensions}{File Extensions}.
2401 \section1 QMAKE_EXTRA_COMPILERS
2403 This variable contains the extra compilers/preprocessors that have been added
2405 See also \l{Configuring qmake's Environment#Customizing}{Customizing Makefile Output}
2407 \section1 QMAKE_EXTRA_TARGETS
2409 This variable contains the extra targets that have been added
2411 See also \l{Configuring qmake's Environment#Customizing}{Customizing Makefile Output}
2413 \target QMAKE_FAILED_REQUIREMENTS
2414 \section1 QMAKE_FAILED_REQUIREMENTS
2416 This variable contains the list of requirements that were failed to be met
2417 when \l{qmake Manual#qmake}{\c qmake} was used. For example, the sql module
2418 is needed and wasn't compiled into Qt. The value of this variable is
2419 typically handled by \l{qmake Manual#qmake}{\c qmake} or
2420 \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
2422 \target QMAKE_FILETAGS
2423 \section1 QMAKE_FILETAGS
2425 This variable contains the file tags needed to be entered into the
2426 Makefile, such as SOURCES and HEADERS. The value of this variable is
2427 typically handled by \l{qmake Manual#qmake}{\c qmake} or
2428 \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
2430 \section1 QMAKE_FRAMEWORK_BUNDLE_NAME
2432 In a framework project, this variable contains the name to be used for the
2433 framework that is built.
2435 By default, this variable contains the same value as the \l{#TARGET}{TARGET}
2438 See \l{qmake Platform Notes#Creating Frameworks}{qmake Platform Notes} for
2439 more information about creating frameworks and library bundles.
2441 \e{This is used on Mac OS X only.}
2443 \target QMAKE_FRAMEWORK_VERSION
2444 \section1 QMAKE_FRAMEWORK_VERSION
2446 For projects where the build target is a Mac OS X framework, this variable
2447 is used to specify the version number that will be applied to the framework
2450 By default, this variable contains the same value as the \l{#VERSION}{VERSION}
2453 See \l{qmake Platform Notes#Creating Frameworks}{qmake Platform Notes} for
2454 more information about creating frameworks.
2456 \e{This is used on Mac OS X only.}
2458 \target QMAKE_INCDIR
2459 \section1 QMAKE_INCDIR
2461 This variable contains the location of all known header files to be added
2462 to INCLUDEPATH when building an application. The value of this variable is
2463 typically handled by \l{qmake Manual#qmake}{\c qmake} or
2464 \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
2466 \target QMAKE_INCDIR_EGL
2467 \section1 QMAKE_INCDIR_EGL
2469 This variable contains the location of EGL header files to be added to
2470 INCLUDEPATH when building an application with OpenGL/ES or OpenVG support.
2471 The value of this variable is typically handled by
2472 \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
2473 needs to be modified.
2475 \target QMAKE_INCDIR_OPENGL
2476 \section1 QMAKE_INCDIR_OPENGL
2478 This variable contains the location of OpenGL header files to be added
2479 to INCLUDEPATH when building an application with OpenGL support. The
2480 value of this variable is typically handled by
2481 \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
2482 needs to be modified.
2484 If the OpenGL implementation uses EGL (most OpenGL/ES systems),
2485 then QMAKE_INCDIR_EGL may also need to be set.
2487 \section1 QMAKE_INCDIR_OPENGL_ES1, QMAKE_INCDIR_OPENGL_ES2
2489 These variables contain the location of OpenGL headers files to be added
2490 to INCLUDEPATH when building an application with OpenGL ES 1
2491 or OpenGL ES 2 support respectively.
2493 The value of this variable is typically handled by \
2494 l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
2495 needs to be modified.
2497 If the OpenGL implementation uses EGL (most OpenGL/ES systems),
2498 then QMAKE_INCDIR_EGL may also need to be set.
2500 \target QMAKE_INCDIR_OPENVG
2501 \section1 QMAKE_INCDIR_OPENVG
2503 This variable contains the location of OpenVG header files to be added
2504 to INCLUDEPATH when building an application with OpenVG support. The
2505 value of this variable is typically handled by
2506 \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
2507 needs to be modified.
2509 If the OpenVG implementation uses EGL then QMAKE_INCDIR_EGL may also
2512 \target QMAKE_INCDIR_QT
2513 \section1 QMAKE_INCDIR_QT
2515 This variable contains the location of all known header file paths to be
2516 added to INCLUDEPATH when building a Qt application. The value of this
2517 variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or
2518 \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
2520 \target QMAKE_INCDIR_THREAD
2521 \section1 QMAKE_INCDIR_THREAD
2523 This variable contains the location of all known header file paths to be
2524 added to INCLUDEPATH when building a multi-threaded application. The value
2525 of this variable is typically handled by \l{qmake Manual#qmake}{\c qmake}
2526 or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
2528 \target QMAKE_INCDIR_X11
2529 \section1 QMAKE_INCDIR_X11
2531 \e {This is used on Unix platforms only.}
2533 This variable contains the location of X11 header file paths to be added
2534 to INCLUDEPATH when building a X11 application. The value of this variable
2535 is typically handled by \l{qmake Manual#qmake}{\c qmake} or
2536 \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
2538 \target QMAKE_INFO_PLIST
2539 \section1 QMAKE_INFO_PLIST
2541 \e {This is used on Mac OS X platforms only.}
2543 This variable contains the name of the property list file, \c{.plist}, you
2544 would like to include in your Mac OS X application bundle.
2546 In the \c{.plist} file, you can define some variables, e.g., @EXECUTABLE@,
2547 which qmake will replace with the actual executable name. Other variables
2548 include @ICON@, @TYPEINFO@, @LIBRARY@, and @SHORT_VERSION@.
2550 \note Most of the time, the default \c{Info.plist} is good enough.
2552 \section1 QMAKE_LFLAGS
2554 This variable contains a general set of flags that are passed to
2555 the linker. If you need to change the flags used for a particular
2556 platform or type of project, use one of the specialized variables
2557 for that purpose instead of this variable.
2559 \target QMAKE_LFLAGS_CONSOLE
2560 \section1 QMAKE_LFLAGS_CONSOLE
2562 \e {This is used on Windows only.}
2564 This variable contains link flags when building console programs. The value
2565 of this variable is typically handled by \l{qmake Manual#qmake}{\c qmake}
2566 or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
2568 \section1 QMAKE_LFLAGS_CONSOLE_DLL
2570 \e {This is used on Windows only.}
2572 This variable contains link flags when building console dlls. The value of
2573 this variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or
2574 \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
2576 \section1 QMAKE_LFLAGS_DEBUG
2578 This variable contains link flags when building debuggable applications.
2579 The value of this variable is typically handled by
2580 \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
2581 needs to be modified.
2583 \section1 QMAKE_LFLAGS_PLUGIN
2585 This variable contains link flags when building plugins. The value of this
2586 variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or
2587 \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
2589 \section1 QMAKE_LFLAGS_RPATH
2591 \e {This is used on Unix platforms only.}
2593 Library paths in this definition are added to the executable at link
2594 time so that the added paths will be preferentially searched at runtime.
2596 \section1 QMAKE_LFLAGS_QT_DLL
2598 This variable contains link flags when building programs that use the Qt
2599 library built as a dll. The value of this variable is typically handled by
2600 \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
2601 needs to be modified.
2603 \section1 QMAKE_LFLAGS_RELEASE
2605 This variable contains link flags when building applications for release.
2606 The value of this variable is typically handled by
2607 \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
2608 needs to be modified.
2610 \section1 QMAKE_LFLAGS_SHAPP
2612 This variable contains link flags when building applications which are
2613 using the \c app template. The value of this variable is typically
2614 handled by \l{qmake Manual#qmake}{\c qmake} or
2615 \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
2617 \section1 QMAKE_LFLAGS_SHLIB
2619 This variable contains link flags when building shared libraries
2620 The value of this variable is typically handled by
2621 \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
2622 needs to be modified.
2624 \section1 QMAKE_LFLAGS_SONAME
2626 This variable specifies the link flags to set the name of shared objects,
2627 such as .so or .dll. The value of this variable is typically handled by
2628 \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
2629 needs to be modified.
2631 \section1 QMAKE_LFLAGS_THREAD
2633 This variable contains link flags when building multi-threaded projects.
2634 The value of this variable is typically handled by
2635 \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
2636 needs to be modified.
2638 \section1 QMAKE_LFLAGS_WINDOWS
2640 \e {This is used on Windows only.}
2642 This variable contains link flags when building Windows GUI projects (i.e.
2643 non-console applications). The value of this variable is typically handled
2644 by \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
2645 needs to be modified.
2647 \section1 QMAKE_LFLAGS_WINDOWS_DLL
2649 \e {This is used on Windows only.}
2651 This variable contains link flags when building Windows DLL projects. The
2652 value of this variable is typically handled by
2653 \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
2654 needs to be modified.
2656 \section1 QMAKE_LIBDIR
2658 This variable contains the location of all known library directories. The
2659 value of this variable is typically handled by \l{qmake Manual#qmake}{\c qmake}
2660 or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
2662 \section1 QMAKE_LIBDIR_FLAGS
2664 \e {This is used on Unix platforms only.}
2666 This variable contains the location of all library directory with -L
2667 prefixed. The value of this variable is typically handled by
2668 \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
2669 needs to be modified.
2671 \section1 QMAKE_LIBDIR_EGL
2673 This variable contains the location of the EGL library directory, when EGL
2674 is used with OpenGL/ES or OpenVG. The value of this variable is typically
2675 handled by \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf}
2676 and rarely needs to be modified.
2678 \section1 QMAKE_LIBDIR_OPENGL
2680 This variable contains the location of the OpenGL library directory. The
2681 value of this variable is typically handled by
2682 \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
2683 needs to be modified.
2685 If the OpenGL implementation uses EGL (most OpenGL/ES systems),
2686 then QMAKE_LIBDIR_EGL may also need to be set.
2688 \section1 QMAKE_LIBDIR_OPENVG
2690 This variable contains the location of the OpenVG library directory. The
2691 value of this variable is typically handled by
2692 \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
2693 needs to be modified.
2695 If the OpenVG implementation uses EGL, then QMAKE_LIBDIR_EGL
2696 may also need to be set.
2698 \section1 QMAKE_LIBDIR_QT
2700 This variable contains the location of the Qt library directory. The value
2701 of this variable is typically handled by \l{qmake Manual#qmake}{\c qmake}
2702 or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
2704 \section1 QMAKE_LIBDIR_X11
2706 \e {This is used on Unix platforms only.}
2708 This variable contains the location of the X11 library directory. The value
2709 of this variable is typically handled by \l{qmake Manual#qmake}{\c qmake}
2710 or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
2712 \section1 QMAKE_LIBS
2714 This variable contains all project libraries. The value of this variable
2715 is typically handled by \l{qmake Manual#qmake}{\c qmake} or
2716 \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
2718 \section1 QMAKE_LIBS_CONSOLE
2720 \e {This Windows-specific variable is no longer used.}
2722 Prior to Qt 4.2, this variable was used to list the libraries
2723 that should be linked against when building a console application
2724 project on Windows. \l{#QMAKE_LIBS_WINDOW}{QMAKE_LIBS_WINDOW}
2725 should now be used instead.
2727 \section1 QMAKE_LIBS_EGL
2729 This variable contains all EGL libraries when building Qt with OpenGL/ES
2730 or OpenVG. The value of this variable is typically handled by
2731 \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
2732 needs to be modified. The usual value is \c{-lEGL}.
2734 \section1 QMAKE_LIBS_OPENGL
2736 This variable contains all OpenGL libraries. The value of this variable
2737 is typically handled by \l{qmake Manual#qmake}{\c qmake} or
2738 \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
2740 If the OpenGL implementation uses EGL (most OpenGL/ES systems),
2741 then QMAKE_LIBS_EGL may also need to be set.
2743 \section1 QMAKE_LIBS_OPENGL_QT
2745 This variable contains all OpenGL Qt libraries.The value of this variable
2746 is typically handled by \l{qmake Manual#qmake}{\c qmake} or
2747 \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
2749 \section1 QMAKE_LIBS_OPENGL_ES1, QMAKE_LIBS_OPENGL_ES2
2751 These variables contain all the OpenGL libraries for OpenGL ES 1
2754 The value of these variables is typically handled by
2755 \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
2756 needs to be modified.
2758 If the OpenGL implementation uses EGL (most OpenGL/ES systems),
2759 then QMAKE_LIBS_EGL may also need to be set.
2761 \section1 QMAKE_LIBS_OPENVG
2763 This variable contains all OpenVG libraries. The value of this variable
2764 is typically handled by \l{qmake Manual#qmake}{\c qmake} or
2765 \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. The usual
2766 value is \c{-lOpenVG}.
2768 Some OpenVG engines are implemented on top of OpenGL. This will
2769 be detected at configure time and QMAKE_LIBS_OPENGL will be implicitly
2770 added to QMAKE_LIBS_OPENVG wherever the OpenVG libraries are linked.
2772 If the OpenVG implementation uses EGL, then QMAKE_LIBS_EGL may also
2775 \section1 QMAKE_LIBS_QT
2777 This variable contains all Qt libraries.The value of this variable is
2778 typically handled by \l{qmake Manual#qmake}{\c qmake} or
2779 \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
2781 \section1 QMAKE_LIBS_QT_DLL
2783 \e {This is used on Windows only.}
2785 This variable contains all Qt libraries when Qt is built as a dll. The
2786 value of this variable is typically handled by
2787 \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
2788 needs to be modified.
2790 \section1 QMAKE_LIBS_QT_OPENGL
2792 This variable contains all the libraries needed to link against if OpenGL
2793 support is turned on. The value of this variable is typically handled by
2794 \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
2795 needs to be modified.
2797 \section1 QMAKE_LIBS_QT_THREAD
2799 This variable contains all the libraries needed to link against if thread
2800 support is turned on. The value of this variable is typically handled by
2801 \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
2802 needs to be modified.
2804 \section1 QMAKE_LIBS_RT
2806 \e {This is used with Borland compilers only.}
2808 This variable contains the runtime library needed to link against when
2809 building an application. The value of this variable is typically handled
2810 by \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and
2811 rarely needs to be modified.
2813 \section1 QMAKE_LIBS_RTMT
2815 \e {This is used with Borland compilers only.}
2817 This variable contains the runtime library needed to link against when
2818 building a multi-threaded application. The value of this variable is
2819 typically handled by \l{qmake Manual#qmake}{\c qmake} or
2820 \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
2822 \section1 QMAKE_LIBS_THREAD
2824 \e {This is used on Unix and Symbian platforms only.}
2826 This variable contains all libraries that need to be linked against when
2827 building a multi-threaded application. The value of this variable is
2828 typically handled by \l{qmake Manual#qmake}{\c qmake} or
2829 \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
2831 \section1 QMAKE_LIBS_WINDOWS
2833 \e {This is used on Windows only.}
2835 This variable contains all windows libraries. The value of this variable
2836 is typically handled by \l{qmake Manual#qmake}{\c qmake} or
2837 \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
2839 \section1 QMAKE_LIBS_X11
2841 \e {This is used on Unix platforms only.}
2843 This variable contains all X11 libraries.The value of this variable is
2844 typically handled by \l{qmake Manual#qmake}{\c qmake} or
2845 \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
2847 \section1 QMAKE_LIBS_X11SM
2849 \e {This is used on Unix platforms only.}
2851 This variable contains all X11 session management libraries. The value of
2852 this variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or
2853 \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
2855 \section1 QMAKE_LIB_FLAG
2857 This variable is not empty if the \c lib template is specified. The value
2858 of this variable is typically handled by \l{qmake Manual#qmake}{\c qmake}
2859 or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
2861 \section1 QMAKE_LINK_SHLIB_CMD
2863 This variable contains the command to execute when creating a shared
2864 library. The value of this variable is typically handled by
2865 \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
2866 needs to be modified.
2868 \section1 QMAKE_LN_SHLIB
2870 This variable contains the command to execute when creating a link
2871 to a shared library. The
2872 value of this variable is typically handled by \c qmake or
2873 \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
2875 \section1 QMAKE_POST_LINK
2877 This variable contains the command to execute after linking the TARGET
2878 together. This variable is normally empty and therefore nothing is
2879 executed, additionally some backends will not support this - mostly only
2882 \section1 QMAKE_PRE_LINK
2884 This variable contains the command to execute before linking the TARGET
2885 together. This variable is normally empty and therefore nothing is
2886 executed, additionally some backends will not support this - mostly only
2889 \section1 QMAKE_PROJECT_NAME
2891 \e {This is used for Visual Studio project files only.}
2893 This variable determines the name of the project when generating project
2894 files for IDEs. The default value is the target name. The value of this
2895 variable is typically handled by \l {qmake Manual#qmake}{ \c qmake} and
2896 rarely needs to be modified.
2898 \section1 QMAKE_MAC_SDK
2900 This variable is used on Mac OS X when building universal binaries.
2901 This process is described in more detail in the
2902 \l{Deploying an Application on Mac OS X#Architecture Dependencies}{Deploying
2903 an Application on Mac OS X} document.
2905 \section1 QMAKE_MACOSX_DEPLOYMENT_TARGET
2906 This variable only has an effect when building on Mac OS X. On that
2907 platform, the variable will be forwarded to the MACOSX_DEPLOYMENT_TARGET
2908 environment variable, which is interpreted by the compiler or linker.
2909 For more information, see the
2910 \l{Deploying an Application on Mac OS X#Mac OS X Version Dependencies}{Deploying
2911 an Application on Mac OS X} document.
2913 \section1 QMAKE_MAKEFILE
2915 This variable contains the name of the Makefile to create. The value of
2916 this variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or
2917 \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
2919 \section1 QMAKE_MOC_SRC
2921 This variable contains the names of all moc source files to generate and
2922 include in the project. The value of this variable is typically handled by
2923 \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
2924 needs to be modified.
2926 \section1 QMAKE_QMAKE
2928 This variable contains the location of qmake if it is not in the path. The
2929 value of this variable is typically handled by
2930 \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
2931 needs to be modified.
2933 \section1 QMAKE_QT_DLL
2935 This variable is not empty if Qt was built as a dll. The value of this
2936 variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or
2937 \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
2939 \section1 QMAKE_RESOURCE_FLAGS
2941 This variable is used to customize the list of options passed to the
2942 \l{rcc}{Resource Compiler} in each of the build rules where it is used.
2943 For example, the following line ensures that the \c{-threshold} and
2944 \c{-compress} options are used with particular values each time that
2947 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 45
2949 \section1 QMAKE_RPATH
2951 \e {This is used on Unix platforms only.}
2953 Is equivalent to \l QMAKE_LFLAGS_RPATH.
2955 \section1 QMAKE_RPATHDIR
2957 \e {This is used on Unix platforms only.}
2959 A list of library directory paths, these paths are added to the
2960 executable at link time so that the paths will be preferentially
2961 searched at runtime.
2963 \section1 QMAKE_RUN_CC
2965 This variable specifies the individual rule needed to build an object. The
2966 value of this variable is typically handled by
2967 \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
2968 needs to be modified.
2970 \section1 QMAKE_RUN_CC_IMP
2972 This variable specifies the individual rule needed to build an object. The
2973 value of this variable is typically handled by
2974 \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
2975 needs to be modified.
2977 \section1 QMAKE_RUN_CXX
2979 This variable specifies the individual rule needed to build an object. The
2980 value of this variable is typically handled by
2981 \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
2982 needs to be modified.
2984 \section1 QMAKE_RUN_CXX_IMP
2986 This variable specifies the individual rule needed to build an object. The
2987 value of this variable is typically handled by
2988 \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
2989 needs to be modified.
2991 \section1 QMAKE_TARGET
2993 This variable contains the name of the project target. The value of this
2994 variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or
2995 \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
2999 This variable contains the location of uic if it is not in the path. The
3000 value of this variable is typically handled by
3001 \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
3002 needs to be modified.
3004 It can be used to specify arguments to uic as well, such as additional plugin
3007 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 46
3011 The values stored in the \c QT variable control which of the Qt modules are
3012 used by your project.
3014 The table below shows the options that can be used with the \c QT variable
3015 and the features that are associated with each of them:
3018 \header \o Option \o Features
3019 \row \o core (included by default) \o QtCore module
3020 \row \o gui (included by default) \o QtGui module
3021 \row \o network \o QtNetwork module
3022 \row \o opengl \o QtOpenGL module
3023 \row \o phonon \o Phonon Multimedia Framework
3024 \row \o sql \o QtSql module
3025 \row \o svg \o QtSvg module
3026 \row \o xml \o QtXml module
3027 \row \o webkit \o WebKit integration
3028 \row \o qt3support \o Qt3Support module
3031 By default, \c QT contains both \c core and \c gui, ensuring that standard
3032 GUI applications can be built without further configuration.
3034 If you want to build a project \e without the QtGui module, you need to
3035 exclude the \c gui value with the "-=" operator; the following line will
3036 result in a minimal Qt project being built:
3038 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 47
3040 Note that adding the \c opengl option to the \c QT variable automatically
3041 causes the equivalent option to be added to the \c CONFIG variable.
3042 Therefore, for Qt applications, it is not necessary to add the \c opengl
3043 option to both \c CONFIG and \c{QT}.
3047 This variable contains a list of names of static plugins that are to be
3048 compiled with an application so that they are available as built-in
3052 \section1 QT_VERSION
3054 This variable contains the current version of Qt.
3056 \target QT_MAJOR_VERSION
3057 \section1 QT_MAJOR_VERSION
3059 This variable contains the current major version of Qt.
3061 \target QT_MINOR_VERSION
3062 \section1 QT_MINOR_VERSION
3064 This variable contains the current minor version of Qt.
3066 \target QT_PATCH_VERSION
3067 \section1 QT_PATCH_VERSION
3069 This variable contains the current patch version of Qt.
3073 This variable contains the name of the resource file for the application.
3074 The value of this variable is typically handled by
3075 \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
3076 needs to be modified.
3081 This variable specifies the directory where all intermediate
3082 resource files should be placed.
3086 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 48
3091 This is a special variable processed by \l{qmake Manual#qmake}{\c qmake}.
3092 If the contents of this variable do not appear in CONFIG by the time this
3093 variable is assigned, then a minimal Makefile will be generated that
3094 states what dependencies (the values assigned to REQUIRES) are
3097 This is mainly used in Qt's build system for building the examples.
3101 This variable contains the name of the resource collection file (qrc)
3102 for the application. Further information about the resource collection
3103 file can be found at \l{The Qt Resource System}.
3107 This variable contains the name of the resource file for the application.
3108 The value of this variable is typically handled by
3109 \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
3110 needs to be modified.
3115 \e {This is only used on the Symbian platform.}
3117 Generic RSS file content can be specified with this variable. The syntax is
3118 similar to \c MMP_RULES and \c BLD_INF_RULES.
3122 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 144
3124 This will add the specified statement to the end of the \c APP_REGISTRATION_INFO
3125 resource struct in the generated registration resource file.
3126 As an impact of this statement, the application will not be visible in application shell.
3128 It is also possible to add multiple rows in a single block. Each double
3129 quoted string will be placed on a new row in the registration resource file.
3133 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 145
3135 This example will install the application to MyFolder in the Symbian
3136 platform application shell. In addition it will make the application to
3137 be launched in background.
3139 From S60 version 5.4 onwards, you can specify \c graphics_memory value using \c RSS_RULES
3140 to specify the graphics memory quota for the application. The value is in kilobytes and
3141 defaults to 24576 (i.e. 24MB) for applications that link against QtGui. The default for all
3142 other applications is zero.
3144 The graphics memory quota tells the operating system how much graphics memory the
3145 application is likely to need so that it can free up enough graphics memory prior to
3146 application launch. If the value is too small, it can cause random slowdowns later when
3147 the memory is freed on on-demand basis. On the other hand, too large values can delay
3148 the application launch unnecessarily.
3152 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 159
3154 This example sets the graphics memory quota to 12MB.
3156 For detailed list of possible \c APP_REGISTRATION_INFO statements, please refer to the
3157 Symbian platform help.
3159 \note You should not use \c RSS_RULES variable to set the following RSS statements:
3160 \c app_file, \c localisable_resource_file, and \c localisable_resource_id.
3162 These statements are internally handled by qmake.
3164 There is a number of special modifiers you can attach to \c RSS_RULES to specify where
3165 in the application registration file the rule will be written:
3168 \header \o Modifier \o Location of the rule
3169 \row \o <no modifier> \o Inside \c APP_REGISTRATION_INFO resource struct.
3170 \row \o .header \o Before \c APP_REGISTRATION_INFO resource struct.
3171 \row \o .footer \o After \c APP_REGISTRATION_INFO resource struct.
3172 \row \o .service_list \o Inside a \c SERVICE_INFO item in the \c service_list
3173 of \c APP_REGISTRATION_INFO
3174 \row \o .file_ownership_list \o Inside a \c FILE_OWNERSHIP_INFO item in the
3175 \c file_ownership_list of \c APP_REGISTRATION_INFO
3176 \row \o .datatype_list \o Inside a \c DATATYPE item in the \c datatype_list of
3177 \c APP_REGISTRATION_INFO
3182 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 151
3184 This example will define service information for a fictional service that requires
3185 an icon to be supplied via the \c opaque_data of the service information.
3188 \section1 S60_VERSION
3190 \e {This is only used on the Symbian platform.}
3192 Contains the version number of the underlying S60 SDK; e.g. "5.0".
3194 \target SIGNATURE_FILE
3195 \section1 SIGNATURE_FILE
3197 \e {This is only used on Windows CE.}
3199 Specifies which signature file should be used to sign the project target.
3201 \note This variable will overwrite the setting you have specified in configure,
3202 with the \c -signature option.
3207 This variable contains the name of all source files in the project.
3211 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 49
3213 See also \l{#HEADERS}{HEADERS}
3217 This variable is set by \l{qmake Manual#qmake}{\c qmake} if files can be
3218 found that contain the Q_OBJECT macro. \c SRCMOC contains the name of all
3219 the generated moc files. The value of this variable is typically handled
3220 by \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and
3221 rarely needs to be modified.
3226 This variable, when used with the \c subdirs \l{#TEMPLATE}{template}
3227 specifies the names of all subdirectories or project files that contain
3228 parts of the project that need to be built. Each subdirectory specified
3229 using this variable must contain its own project file.
3231 It is recommended that the project file in each subdirectory has the same
3232 base name as the subdirectory itself, because that makes it possible to omit
3233 the file name. For example, if the subdirectory is called \c myapp, the
3234 project file in that directory should be called \c myapp.pro.
3236 Alternatively, you can specify a relative path to a .pro file in any
3237 directory. It is strongly recommended that you specify only paths in the
3238 current project's parent directory or its subdirectories.
3242 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 50
3244 If you need to ensure that the subdirectories are built in the order in
3245 which they are specified, update the \l{#CONFIG}{CONFIG} variable to
3246 include the \c ordered option:
3248 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 51
3250 It is possible to modify this default behavior of \c SUBDIRS by giving
3251 additional modifiers to \c SUBDIRS elements. Supported modifiers are:
3254 \header \o Modifier \o Effect
3255 \row \o .subdir \o Use the specified subdirectory instead of \c SUBDIRS value.
3256 \row \o .file \o Specify the subproject \c pro file explicitly. Cannot be
3257 used in conjunction with \c .subdir modifier.
3258 \row \o .condition \o Specifies a \c bld.inf define that must be true for
3259 subproject to be built. Available only on Symbian platform.
3260 \row \o .depends \o This subproject depends on specified subproject.
3261 Available only on platforms that use makefiles.
3262 \row \o .makefile \o The makefile of subproject.
3263 Available only on platforms that use makefiles.
3264 \row \o .target \o Base string used for makefile targets related to this
3266 Available only on platforms that use makefiles.
3269 For example, define two subdirectories, both of which reside in a different directory
3270 than the \c SUBDIRS value, and one of the subdirectories must be built before the other:
3272 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 149
3274 For example, define a subdirectory that is only build for emulator builds in Qt for Symbian:
3276 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 150
3278 \section2 Ordered Targets and Visual Studio Solution Files
3280 The \c ordered option is not supported for Visual Studio. The following list describes how
3281 you can get around without it--dependencies are generated automatically if:
3284 \o 1a) There is a Lib/DLL project of which TARGET (the .lib is used and not the .dll)
3285 is used on the link line of another project in your solution (you can modify the link
3288 \o 1b) There is an Exe project of which TARGET is used in a custom
3289 build-step of another project in your solution.
3291 \o 2) You don't use paths in the TARGET variable (use DESTDIR/DLLDESTDIR for that),
3292 e.g, TARGET=$(SOME_VARIABLE)/myLib, won't work.
3294 \o 3) If you have a special location for your libs, you specify the -Lmy/library/path and
3295 LIBS += mylib, instead of just using LIBS += my/library/path/mylib
3297 \o 4) The leaf projects are created before you generate the solution file. (You can use the
3298 recursive flag for qmake to do this, like "qmake -tp vc -r [yourproject.pro]"
3301 \target SYMBIAN_VERSION
3302 \section1 SYMBIAN_VERSION
3304 \e {This is only used on the Symbian platform.}
3306 Contains the version number of the underlying Symbian SDK; e.g. "9.2" or "Symbian3".
3311 This specifies the name of the target file.
3315 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 52
3317 The project file above would produce an executable named \c myapp on
3318 unix and 'myapp.exe' on windows.
3320 \target TARGET.CAPABILITY
3321 \section1 TARGET.CAPABILITY
3323 \e {This is only used on the Symbian platform.}
3325 Specifies which platform capabilities the application should have. These
3326 include the following basic capabilities, but others are also available
3327 for signed applications.
3330 \header \o Capability \o Description
3331 \row \o LocalServices \o The ability to use local services running on the
3332 phone or device, including those which provide
3333 local connectivity to other devices.
3334 \row \o Location \o Access to the service that provides information
3335 about the user's location, from GPS, phone
3336 network, or other sources.
3337 \row \o NetworkServices \o Use of services that access the phone network,
3338 such as dialling a phone number, sending an SMS,
3339 or other operations that result in network
3341 \row \o ReadUserData \o Access to the user's private data, such as
3342 contact information.
3343 \row \o UserEnvironment \o The ability to use services that provide from the
3344 user's physical environment, such as the camera or
3346 \row \o WriteUserData \o The ability to write or modify the user's private
3350 For more information, and a comprehensive list of capabilities, please refer
3351 to the Symbian SDK documentation or the \l{Symbian Capabilities} page of
3352 the \l{Forum Nokia Wiki}.
3354 \target TARGET.EPOCALLOWDLLDATA
3355 \section1 TARGET.EPOCALLOWDLLDATA
3357 \e {This is only used on the Symbian platform.}
3359 Specifies whether static data should be allowed in the application. Symbian
3360 disallows this by default in order to save memory. To use it, set this to 1.
3362 \target TARGET.EPOCHEAPSIZE
3363 \section1 TARGET.EPOCHEAPSIZE
3365 \e {This is only used on the Symbian platform.}
3367 Specifies the minimum and maximum heap size of the application. The program
3368 will refuse to run if the minimum size is not available when it starts. For
3371 \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 135
3373 \target TARGET.EPOCSTACKSIZE
3374 \section1 TARGET.EPOCSTACKSIZE