A minimal project template for building a C++ application using Lagom from SerenityOS.
It also includes some recommended settings (some from SerenityOS' documentation) for Visual Studio Code.
Note It is recommended that you use the clangd extension for Visual Studio Code.
A lot of the default configuration is suited to mimic the SerenityOS coding style, but feel free to change it! :)
-
Clone the repository
$ git clone git@github.com:caoimhebyrne/cmake-lagom-template.git
-
Set the
SERENITY_SOURCE_DIR
environment variable to your local clone of SerenityOS/serenity. (Optional, reduces build time).bashrc/zshrc
... export SERENITY_SOURCE_DIR=~/path/to/serenity/directory
-
Replace all instances of
cmake_lagom_template
with your project's name -
Run the
Scripts/setup.sh
script$ Scripts/setup.sh
-
Build and run your program with the
Scripts/build-and-run.sh
script!$ Scripts/build-and-run.sh
The following repositories and people helped with creating this template:
- linusg/test262: Being a reference for our
CMakeLists.txt
- SerenityOS/ladybird: An up-to-date
CMake/FetchLagom.cmake
script - SerenityOS/serenity:
clang-format
configuration - ❤️ And everyone at the SerenityOS project for making an amazing collection of libraries to use! ❤️