[Previous: qmake Manual] [Next: qmake Project Files]
qmake provides a project-oriented system for managing the buildprocess for applications, libraries, and other components. This approach gives developers control over the source files used, and allows each of the steps in the process to be described concisely, typically within a single file. qmake expands the information in each project file to a Makefile that executes the necessary commands for compiling and linking.
In this document, we provide a basic introduction to project files, describe some of the main features of qmake, and show how to use qmake on the command line.
Projects are described by the contents of project (.pro) files. The information within these is used by qmake to generate a Makefile containing all the commands that are needed to build each project. Project files typically contain a list of source and header files, general configuration information, and any application-specific details, such as a list of extra libraries to link against, or a list of extra include paths to use.
Project files can contain a number of different elements, including comments, variable declarations, built-in functions, and some simple control structures. In most simple projects, it is only necessary to declare the source and header files that are used to build the project with some basic configuration options.
Complete examples of project files can be found in the qmake Tutorial. An introduction to project files can be found in the qmake Project Files chapter, and a more detailed description is available in the qmake Reference.
For simple projects, you only need to run qmake in the top level directory of your project. By default, qmake generates a Makefile that you then use to build the project, and you can then run your platform's make tool to build the project.
qmake can also be used to generate project files. A full description of qmake's command line options can be found in the Running qmake chapter of this manual.
In large projects, it is possible to take advantage of precompiled header files to speed up the build process. This feature is described in detail in the Using Precompiled Headers chapter.
[Previous: qmake Manual] [Next: qmake Project Files]
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.