MiniECS uses CMake as its sole build system. A singleDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/raoulkdev/MiniECS/llms.txt
Use this file to discover all available pages before exploring further.
CMakeLists.txt at the project root declares all source files, sets the C++ standard, and produces a standalone executable with no external libraries to link beyond the standard library and the header-only GLM math dependency. This page covers everything you need to know to configure the project from the command line, adjust the GLM include path for your environment, and optionally integrate with a C++ IDE.
Prerequisites
You need three tools before you can build MiniECS:| Requirement | Minimum version | Notes |
|---|---|---|
| C++20 compiler | GCC 10+, Clang 10+, MSVC 19.29+ | Must support C++20 features used by <memory> and structured bindings. |
| CMake | 3.30 | Matches the cmake_minimum_required declaration in CMakeLists.txt. |
| GLM | Any recent release | Header-only; no compiled library needed. |
GLM (OpenGL Mathematics) is a header-only library, which means there is nothing to compile or link. CMake does not need to find a
.lib or .so file — you simply need the GLM headers available on the file system and an accurate #include path in TransformModule.h. No find_package(glm) call is required in the current CMakeLists.txt.Installing Prerequisites
macOS (Homebrew):CMakeLists.txt
The complete build definition for MiniECS is intentionally short. Here is the actualCMakeLists.txt from the repository:
cmake_minimum_required(VERSION 3.30)— enforces that the CMake installation is at least version 3.30, matching the project’s policy settings.project(MiniECS)— names the project and sets thePROJECT_NAMEvariable used internally by CMake.set(CMAKE_CXX_STANDARD 20)— instructs the compiler to use C++20 mode (-std=c++20on GCC/Clang,/std:c++20on MSVC).add_executable(MiniECS ...)— declares a single compilation target namedMiniECSand lists every.cppand.hfile explicitly. Including headers in this list is optional for compilation but makes them visible in IDEs.
Source File Layout
The source tree follows a module-per-subdirectory convention:.h/.cpp pair that inherits from Module, and two lines in CMakeLists.txt.
Building from the Command Line
From the repository root, run:cmake . configures the project in-source (build files land in the same directory as CMakeLists.txt). For a cleaner out-of-source build, use a separate directory:
MiniECS executable appears in whichever directory you ran make from. Run it with:
GLM Path Configuration
TransformModule.h includes GLM with an absolute path that targets the default Homebrew installation on Apple Silicon Macs:
| Platform / package manager | Typical GLM path |
|---|---|
| macOS — Homebrew (Apple Silicon) | /opt/homebrew/include/glm/glm.hpp |
| macOS — Homebrew (Intel) | /usr/local/include/glm/glm.hpp |
| Ubuntu / Debian | /usr/include/glm/glm.hpp |
| Windows — vcpkg | C:/vcpkg/installed/x64-windows/include/glm/glm.hpp |
| Manual install | wherever you extracted the GLM release archive |
CMakeLists.txt:
TransformModule.h to:
IDE Integration
CLion will automatically create acmake-build-debug/ profile when you open the project. Set the GLM path in the CMake cache editor (File → Settings → Build, Execution, Deployment → CMake) or edit TransformModule.h directly.
VS Code requires the CMake Tools extension. Once installed, open the command palette and run CMake: Configure, then CMake: Build.