A practical guide to structuring C++ monorepo projects using CMake so that libraries are independently buildable, testable, and reusable while still supporting incremental developer builds. The approach overrides CMake's find_package to treat local subprojects as if they were external dependencies, enabling both monolithic developer builds and isolated module builds. Nix derivations are also provided to demonstrate per-module packaging, cross-compilation (AARCH64, Windows, static), and composability without coupling the build system to specific paths.
Table of contents
Goal: Maximum Utility for EveryoneMonolithic Repo == Monolithic Build System?ResultSummarySort: