-
Notifications
You must be signed in to change notification settings - Fork 1
Building the Nuria Framework
In order to build the Nuria Framework, you will need to have a decent toolchain available. What you'll need:
- Git
- Any recent C++11-capable Compiler - we recommend GCC 4.9. Clang will work under Linux, Windows user will need to resort to MinGW
- Qt5.2+ including development tools
- The CMake build system
- LLVM/Clang for Tria
- Doxygen for documentation generation (optional)
At runtime, Qt libraries will suffice.
Below you'll find installation instructions for your platform.
You can simply install all dependecies via your distributions package manager. For example:
Arch: pacman -Sy base-devel qt5-base clang cmake git doxygen
Since there is no default package manager for Windows, you'll need to gather all the components yourself.
- Download and install Git. Make sure you've selected the "Use Git from the Windows Command Prompt" option.
You can find Git binaries here: http://git-scm.com/download/win
- Install Qt through the Windows installer. Make sure that you're installing a MinGW-based version, i.e.
Qt\5.3\MinGW 4.8.2 (32 bit). In the following we'll assume you installed that version to the default location,C:\Qt.
You can find the installer here: http://qt-project.org/downloads
- Install a more recent MinGW version. Qt ships with MinGW 4.8.2, which contains a bug that prevents the Twig module from functioning. Download this package and unpack it to
C:\Qt\Tools\mingw482_32(overwriting the Qt-shipped MinGW - this is needed because qmake expects to find its compiler there).
Note: If you wish to install MinGW through an installer, you'll need versions using the posix threading model and dwarf exception handling. Please make sure you're using the more recent MinGW-w64, since the original MinGW is out of date.
- Install CMake. Version 2.8.8 or higher is required, but the most recent 3.0.2 will work just fine. Make sure you've selected one of the "Add cmake to the system PATH" options.
Grab the installer here: http://www.cmake.org/download/
-
Optional: Install doxygen from http://www.stack.nl/~dimitri/doxygen/download.html
-
Add MinGW (
C:\Qt\Tools\mingw482_32\bin) and Qt (C:\Qt\5.3\mingw482_32\bin) to your PATH. We recommend doing this permanently either through your system panel or with the Windows Path Editor utility. Alternatively, you can simply do
set PATH="C:\Qt\Tools\mingw482_32\bin;C:\Qt\5.3\mingw482_32\bin;%PATH%which will modify the path only for the current shell.
Note: Please make sure that MinGW is first in the path, otherwise the wrong libstdc++ version will be found and used first.
-
Optional: Build and install clang if you want to use Tria (recommended), and add it to your path. Detailed instructions are available in Building clang (win32). Note that clang binary releases will not work because the required parts of libclang are not included.
-
Test your environment: Open a shell (cmd), and test the following commands:
- git
- cmake
- qmake
- gcc -v (should output version 4.9.1)
Please make sure that all dependencies are fulfilled beforehand. See the README.md file for details.
-
Clone the Framework repository:
$ git clone https://github.com/NuriaProject/Framework.git -
Go into 'Framework' and let git check out all submodules:
$ cd Framework
$ git submodule update --init --recursive-
Create a 'build' directory and change into it:
mkdir build && cd build -
Let cmake create the Makefile:
$ cmake ..(Note, you may want to pass additional arguments) -
Compile everything:
$ make(Add-jXif you want to build faster, where X is the count of CPU cores you have) -
Run unit-tests:
$ make test -
Install:
$ sudo make install
If you had Doxygen installed, you should have a .qch file (On Linux, it is installed to PREFIX/share/doc/nuriaframework/nuriaprojectframework.qch).
- Find the file on your system.
- In Creator, go to
Tools -> Options - Go to the
Helpsection and click onDocumentation - Click
Add...and select the .qch file - You may need to restart QtCreator now for changes to take effect.
That's it, now you can enjoy documentation right in your IDE!