Github actions | RTD docs | Code Coverage |
---|---|---|
Head onto our Discord for extended support on building and usage.
TEC requires cmake 3.19, a c++17 compatible compiler, and a few libraries GLFW3, GLM, ASIO, Protobuf, GLAD, Lua, Bullet, Dear ImGui, sol3, Spdlog and OpenAL.
The libraries are automatically installed when using CMake and VCPKG manifest mode.
Potentially Download and install oalinst.zip OpenAL installer and install it.
Prior to 11.0.1, run (NOT TESTED): sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
If bootstrap-vcpkg
fails see here for more help
Install the following. This is a pretty extensive list and may be more than needed
build-essential pkg-config tar curl zip unzip gdb libgl1-mesa-dev xorg-dev libglu1-mesa-dev libxinerama-dev libxcursor-dev
- Install CMake
- Install VCPK -
git clone https://github.com/Microsoft/vcpkg.git
VCPKG_ROOT
must be set a an environment variable, to wherever VCPKG was cloned to- Run
$(VCPKG_ROOT)/bootstrap-vcpkg.[bat|sh]
to setup vcpkg. Use the correct extension for your OS.- [OPTIONAL]
$(VCPKG_ROOT)/./vcpkg integrate install
- [OPTIONAL]
- Open the folder in an editor OR see step 6
- Run CMake
- CLI
cmake --preset=ninja-multi-vcpkg
cmake --build --preset=BUILD_PRESET
see presets
- GUI - This will only configure the project. CLI steps or Open in an editor are more useful.
- Set the source folder
- Set the build folder. The presets default to
builds/CONFIG_NAME
e.g.builds/msvc/
- Run Configure
- Pick the Ninja Multi-config generator
- Select Specify toolchain file for cross compiling
- The file input should be filled in, but if not point it to
$(VCPKG_ROOT)/scripts/buildsystems/vcpkg.cmake
- Run Generate
- Open generated solution and build the project(s)
- CLI
gcc10 g++10
orclang-13
build-essential pkg-config tar curl zip unzip gdb
libgl1-mesa-dev xorg-dev libglu1-mesa-dev libxinerama-dev libxcursor-dev p7zip-full
- Visual Studio
- Visual Studio (CMake folder mode)
- Change Tools -> Options -> CMake -> General and enable "Prefer using CMake Presets..."
- Visual Studio Code
- On Windows you may need to add the CMake bin to the system path, for CTest to work.
- CLion
- Not tested, but CMake folder mode should work as expected
ninja-multi-vcpkg
- Ninja multi-build config preset that references the vcpkg toolchain file relative to theVCPKG_ROOT
ninja-multi-vcpkg-debug
- Debug configuration build preset that uses theninja-multi-vcpkg
configninja-multi-vcpkg-release-dbginfo
- Release with debug info configuration build preset that uses theninja-multi-vcpkg
configninja-multi-vcpkg-release
- Release configuration build preset that uses theninja-multi-vcpkg
configninja-multi-docs
- Doc build preset with the documentation custom targets
test-base
- Base test preset that all other tests derive from DO NOT USEninja-multi-vcpkg-debug
- Debug configuration test presetninja-multi-vcpkg-release
- Release configuration test preset
Documentation is done via Doxygen for C++ code and supplementary docs must be maintained for the Lua API in docs/
.
Engine documentation is generated with the with the ninja-multi-docs
build config doxygen
target, and is then
converted to markdown via doxybook2
with the ninja-multi-docs
build config doxybook
target.
All documentation is converted to mkdocs format with the ninja-multi-docs
build config mkdocs
target, and then
readthedocs hosts the mkdocs files.
Doxygen and mkdocs files are not committed, but can be generated locally for consumption/validation. Doxybook
generated engine docs and all other docs in docs/
are committed.
- doxygen 1.9.4
- doxybook2 1.4.0
- python 3.10.4 (Earlier version may work, but untested)
- pip 22.0.4 (Earlier version may work, but untested)
- pip-tools 6.8.0 (Earlier version may work, but untested)
- mkdocs 1.3.0 (see docs/requirements)
To generate the python requirements for mkdocs to be used by readthedoc run pip-compile docs/requirements.in
in the project root.
The following targets can be built when the CMake build preset is set to ninja-multi-docs
- doxygen - Generates full doxygen docs in
doxygen/
- doxybook - Generates markdown versions of doxygen docs and places them in
docs/engine/
- mkdocs - Generates mkdocs from
docs/
in places themmkdocs/
To preview the mkdocs docs locally visit run mkdocs serve
, in the project root.
The follow docker script will setup a docker container that will run clang format.
docker build -t clang-format-lint github.com/DoozyX/clang-format-lint-action
Run the following on windows to format all source files in the src dir
docker run -it --rm --workdir /src -v ${pwd}:/src clang-format-lint --clang-format-executable /clang-format/clang-format11 -r -i true .
Run the following on windows to format all source files in the src dir
docker run -it --rm --workdir /src -v $(pwd):/src clang-format-lint --clang-format-executable /clang-format/clang-format11 -r -i true .