There is a great resource in the qt project site that tells you how to build Qt 5. Here is the site: http://qt-project.org/wiki/Building_Qt_5_from_Git
This article is specific to Qt 5 desktop installation without webkit and with OpenGL Desktop.
I’m currently running Windows 7 on a macbook pro (bootcamp) and also in a dell tower.
To build for windows 7 64 bits (I’m assuming that Windows 8 it is probably the same) you must do the following (note that for 32 bits it will be same instructions but in 32 bit console):
Install Strawberry Perl 64 bit version.
(NOTE: Control Panel –> USE LARGE ICONS, so it gives you all the options and it looks a bit more like XP)
Modify your path (in control panel*==>systems=>advanced=>Environment Variables) and make sure all your strawberry perl directories added (if not add it, for example c:\strawberry\bin) are in the front of your path, or at least right after your windows path (e.g., c:\windows\system32). The reason is that you need the right perl to have this work. Git comes with its own perl.
Install Python 2.x (do not use 3.x) Make sure you install (Python 2.x.x Windows X86-64 Installer) with or without source (up to you). For example, I downlaoded 2.7.6
Make sure Python directory (e.g., c:\python27) is in your path. It can also go somewhere in front, but I don’t think this is a problem.
Install GIT for Windows During the installation, you will be given three choices. The options are about how much (if any) should the path be modified… I used the second one, which is only for git. If you like later to have the git binaries that are included (other than git itself) , you can add it to your path directory at the end of your PATH system environment variable.
You may which to add some “unix” tools like cygwin or other ones (see previous post). For example, the which command is useful to check the path of perl.exe (which perl.exe)
You also need to have install OpenGL (not the one that comes with windows). Your nvidia install plus your Windows SDK (when you install Visual Studio) should suffice all requirements. There is a free utility you can download, called “OpenGL Extension Viewer”.
Now, once you have complied with all the requirements, including installing Visual Studio 2012 (I’m using Update 4… at lease have update 2 or 3), then you should be good to go.
Open the command prompt for Visual Studio 2012 native x64 (The shortcut is called “Open VS2012 x64 Native Tools Command Prompt”).
In the prompt:
Check your perl and pythong and git… now you are good to go…
1) create a directory called qt (up to you where. I like it in c:\qt)
2) Clone qt
git clone git://gitorious.org/qt/qt5.git qt5
(behind a firewall?l):
git clone https://git.gitorious.org/qt/qt5.git qt5
3) Checkout stable version
git checkout stable
4) then run
perl init-repository –no-webkit
5) then run configure (mp for parallel compiling)
configure -opensource -confirm-license -nomake examples -nomake tests -opengl desktop -mp -debug-and-release
6) run nmake
There is a possibility that you will get an error at some point. If this happen, try nmake again … if you see it progresses, it is fine.
7) to clean , run:
git submodule foreach –recursive “git clean -dfx”
This is all you need to compile Qt 5 without webkit and OpenGL Desktop for Visual Studio 2012.
Also remember to download and install “Visual Studio Add-in 1.2.2 for Qt5″ found in http://qt-project.org/downloads