Linux
Linux support for plEngine is currently in development and still to be considered experimental and incomplete. You can try it, but don't expect to be able to work productively with it.
For rendering the new Vulkan backend is used, which itself is also very much in development yet.
We welcome help finding and fixing issues.
Supported Compilers / Make Systems
The plEngine CMake scripts support the following compilers when building for Linux:
GCC
Clang
C++17 support is required, so make sure that your respective compiler supports it.
These generators are currently supported for Linux:
Unix Makefiles
Ninja
Automatic Setup
The RunCMake.sh
script in the root folder of plEngine can be used to automatically install all required packages and run CMake, so that you can start building right away.
This script currently supports these distributions:
Ubuntu 22
Linux Mint 21
We welcome contributions to add support for more distributions.
GCC
When running the script the first time, execute:
./RunCMake.sh --setup
This will install all required packages for your distribution and then generate the make files required to build the Dev
version of plEngine.
To build the Dev
build, execute:
ninja -C build-Dev
This build command is also given by RunCMake.sh
as the final output.
If you change any CMake files or add new source files it is sufficient to run:
./RunCMake.sh
This only invokes CMake, without checking for missing packages.
To build a different build type then Dev
, pass the additional --build-type
argument:
./RunCMake.sh --build-type Debug
Clang
If you would like to use Clang instead of GCC, simply add --clang
to all invocations of RunCMake.sh
:
Installing Qt 6 Manually
Some distributions provide quite outdated versions of Qt 6 and the plEngine Editor requires at least Qt 6.3.0 due to a bug that exists in previous versions of Qt and prevents the 3D viewport in the Editor from working correctly.
You have the following options:
Install through aqtinstall
Install Qt 6 through the official installer
Once you have obtained a recent version of Qt, you have two options so that the plEngine cmake scripts find it:
Add the install location permantently to your
PATH
environment variableSpecify the install location when calling
RunCMake.sh
like this:> PATH=/path/to/qt6/install:$PATH ./RunCMake.sh
Manual Setup
If you want to setup things manually or your distribution is not supported by the RunCMake.sh
script, you will most likely need all of the following packages:
C++17 compliant compiler (GCC or Clang)
CMake 3.20 or newer
uuid-dev
Qt6 (version 6.3 or newer)
ninja or gnu-make
libxrandr
libxinerama
libxcursor
libxi
libfreetype
libtinfo5
Then invoke CMake with the following arguments:
Option | Explanation |
---|---|
| Path to the build directory. |
| Path to the plEngine root. |
| Choose to generate Ninja makefiles. Optional, if not provided gnu-make will be used. |
| Specify the C++ compiler to use. Optional, if not provided the system default will be used. |
| Specify the C compiler to use. Optional, if not provided the system default will be used. |
| Build the plEngine editor on Linux. This is currently experimental and might have significant bugs. |
| Build the Vulkan renderer. This is currently experimental and might have significant bugs. |
| Specify the build type to use. |
| Generate a |
| Manually specify the path cmake should look for Qt 6 in. |
| Disable unity builds. This increases compile times but might help certain editors to provide better code completion. |
Example usage:
Using Qt Creator
The root of the repository can also be opened in Qt Creator, which will generally do a good job at finding the Qt location on its own.
See Also
Building plEngine