Building projects from the command line

Sometimes, you need to build a project from the command line. Maybe you're working on Linux and you're just more comfortable there, or you've got a remote session running on your desktop while you're in a meeting. Or, maybe you want to automate builds on a build server and need to know how Qt performs its compilation magic for your builds.

The trick lies in qmake: Qt's meta-make system that manages the generation of make files for the compiler toolchain you already have installed. The qmake command takes the .pro files, which you first saw in Chapter 2, Building Applications with Qt Creator, and generates the make or nmake file necessary for your tool chain to build your application.

First, ensure that you ...

Get Application Development with Qt Creator - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.