🐧Linux

How to compile, build and / or setup on UNIX based operating system

Dependencies installation

As stated in the introcution, R-THAAAAAAÏ is dependent of 2 libraries, SFML and Boost.

Usage of bundled package manager, vcpkg, is strongly recommended.

Use system-wide library at your own risk.

You may also want to take a look here: Things to remember when compiling our project

How to install dependendcies using bundled vcpkg

vcpkg is bundled as a submodule inside of the R-THAAAAAAÏ.

If the vcpkg directory is empty when you clone the repository, you will need to update and sync the submodule.

To update vpckg submodule, simply: git submodule init and git submodule update vcpkg

Inside the vcpkg directory you should have a file called bootstrap-vcpkg.sh, launch it.

In order to install every dependencies needed by the project. You will need to install those packages from vcpkg: sfml:x64-windows boost-asio:x64-windows boost-thread:x64-windows boost-property-tree:x64-windows

.\vcpkg\vcpkg install sfml:x64-linux-dynamic boost-asio:x64-linux-dynamic boost-thread:x64-linux-dynamic boost-property-tree:x64-linux-dynamic

Installing can take a little bit of time the first time you install but doesn't reflect on the compiling time of the project as it write the libraries on the disk, more precisely inside the vcpkg/installed directory.

Dependencies should have been properly installed by now. If you're encountering any issues during dependencies install, refer back to the steps in this section. if the problem persist, please refer to the error message from the terminal and look at the official vcpkg repository if this error was already encountered. You can also file a new bug report at https://github.com/TEAM-AAAAAAAAAAAAAAAA/RTYPE/issues/new?assignees=&labels=&template=bug_report.md&title=

How to compile with Visual Studio 17 2022

Compiling with any other compiler on windows is currently unsupported.

Compile at your own risk

The CMakeSettings.json can be found at the root of the repository, providing an easy configuration of the build toolchain.

It is recommended to have a valid installation of CMake.

Things to remember when compiling our project

The cmake variable SFML_DIR shall always be set to the installation path of sfml, wether it's installed with vcpkg or not.

If you are using Visual Studio, you should be able to launch directly the solution by loading the directory as a CMake project.

If you want to compile using the CLI. You can do so by first, configure the build folder:

cmake -S . -B ./build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake -DBoost_NO_SYSTEM_PATHS=TRUE -DBOOST_ROOT=vcpkg/installed/x64-linux-dynamic/ -DSFML_DIR=vcpkg/installed/x64-linux-dynamic/share/sfml/

You'll then need to build the project:

cmake --build build -j 10

Resources

Last updated