Navigation Menu

Skip to content

Commit

Permalink
doc about how to compile with 3D, speedup build time with ninja
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustry committed Mar 18, 2020
1 parent a082bde commit 3d25d14
Showing 1 changed file with 40 additions and 4 deletions.
44 changes: 40 additions & 4 deletions doc/linux.t2t
Expand Up @@ -128,7 +128,7 @@ When you run ccmake (note the .. is required!), a menu will appear where
you can configure various aspects of the build. If you want QGIS to have
debugging capabilities then set CMAKE_BUILD_TYPE to Debug. If you do not have
root access or do not want to overwrite existing QGIS installs (by your
packagemanager for example), set the CMAKE_INSTALL_PREFIX to somewhere you
package manager for example), set the CMAKE_INSTALL_PREFIX to somewhere you
have write access to (I usually use ${HOME}/apps). Now press
'c' to configure, 'e' to dismiss any error messages that may appear.
and 'g' to generate the make files. Note that sometimes 'c' needs to
Expand All @@ -137,7 +137,7 @@ After the 'g' generation is complete, press 'q' to exit the ccmake
interactive dialog.

/!\ **Warning:** Make sure that your build directory is completely empty when you
enter the command. Do never try to "re-use" an existing **Qt4** build directory.
enter the command. Do never try to "re-use" an existing **Qt5** build directory.
If you want to use `ccmake` or other interactive tools, run the command in
the empty build directory once before starting to use the interactive tools.

Expand Down Expand Up @@ -210,10 +210,46 @@ Build and install with ninja:
ninja (uses all cores by default; also supports the above described -jX option)
ninja install
```
You can build just the targets you need using, for example:

To build even faster, you can build just the targets you need using, for example:
```
ninja qgis
ninja pycore
# if it's on desktop related code only:
ninja qgis_desktop
```

== Compiling with 3D ==

In the cmake, you need to enable:
```
WITH_3D=True
```
=== Compiling with 3D on Debian based distributions ===

QGIS 3D requires Qt53DExtras. These headers have been removed
from Qt upstream on Debian based distributions. A copy has been made in the
QGIS repository in ``external/qt3dextra-headers``.
To compile with 3D enabled, you need to add some cmake options:
```
CMAKE_PREFIX_PATH={path to QGIS Git repo}/external/qt3dextra-headers/cmake
QT5_3DEXTRA_INCLUDE_DIR={path to QGIS Git repo}/external/qt3dextra-headers
QT5_3DEXTRA_LIBRARY=/usr/lib/x86_64-linux-gnu/libQt53DExtras.so
```

== Building different branches ==

By using ``git worktree``, you can switch between different branches to use
several sources in parallel, based on the same Git configuration.
We recommand you to read the documentation about this Git command:
```
git commit
git worktree add ../my_new_functionality
cd ../my_new_functionality
git fetch qgis/master
git rebase -i qgis/master
# only keep the commits to be pushed
git push -u my_own_repo my_new_functionality
```

== Building Debian packages ==
Expand Down Expand Up @@ -280,7 +316,7 @@ dnf install fcgi-devel
```

Make sure that your build directory is completely empty when you enter the
following command. Do never try to "re-use" an existing Qt4 build directory.
following command. Do never try to "re-use" an existing Qt5 build directory.
If you want to use `ccmake` or other interactive tools, run the following
command in the empty build directory once before starting to use the interactive
tools.
Expand Down

0 comments on commit 3d25d14

Please sign in to comment.