Build Qt - iToto/developmentCycle GitHub Wiki

For development it’s pretty handy to have debug symbols for libraries you’re using. This includes Qt. The problem with Qt builds is that due to an issue in their build system it isn’t easy to distribute debug builds around. This means each developer will have to create their own Qt builds for development.

The Guide

Digia’s got a pretty good guide on how to get things built. I suggest reading through that.

The Short Version

I’ll summarize the necessary steps for our current development (Windows using MSVC2012).

Requirements

The following software is required by the build system and must be on your PATH

  1. Git (version 1.6 or higher)
  2. Perl (version 5.14 or higher – make sure you’re not using the one that comes with Git)
  3. Python (version 2.6 or higher)
  4. jom

Getting the code

We keep our libraries in a specific location and our build scripts look for them in the same place.

<dev_dir>/resources

In here make a folder Qt. Then you will clone the git repository twice, once for 32bit and once for 64.

git clone git://gitorious.org/qt/qt5.git 5_1_1_x86_msvc2012
git clone git://gitorious.org/qt/qt5.git 5_1_1_x64_msvc2012

Running the build scripts

I’ve created a simple little batch file that will run all the necessary commands

call "C:\Program Files (x86)\Microsoft Visual Studio 11.0\vc\vcvarsall.bat"
set CL=/MP
call perl init-repository --no-webkit
call configure -developer-build -opensource -confirm-license -nomake examples -nomake tests -opengl desktop -mp
call jom

and another for the 64 bit version

call "C:\Program Files (x86)\Microsoft Visual Studio 11.0\vc\vcvarsall.bat" amd64
set CL=/MP
call perl init-repository --no-webkit
call configure -developer-build -opensource -confirm-license -nomake examples -nomake tests -opengl desktop -mp
call jom

This assumes you’ve got everything necessary in your PATH and that visual studio’s installed in the usual place. Adjust as necessary for your system.

⚠️ **GitHub.com Fallback** ⚠️