Modern CMake for modular design
summary
Shows concrete migration from legacy CMake anti patterns to target-based usage: how to express dependencies with target_link_libraries with PUBLIC/PRIVATE/INTERFACE, how to encapsulate compile flags and headers so transitive includes and cyclic deps are detected and prevented, and how to export build interfaces or generate find_package helpers and imported targets and generated finders for third‑party libs. Includes minimal version guidance (2.8.12/3.x), examples of interface libraries, and specific pitfalls to fix.
AI-written summary · about
chapters (32)
- 0:00Intro
- 1:00Overview
- 3:57Simek
- 6:32Modular design
- 7:30Example
- 14:11Constraint separation
- 15:53Relationship with build systems
- 16:26Modern build systems
- 21:51Build flags
- 23:21Modern mail system
- 24:53Modern dual system
- 25:33In practice
- 26:55Public vs Private
- 27:44Build system
- 28:06Private dependency
- 29:33No flag
- 30:06Maketransitive dependencies
- 30:42Constraints
- 32:01Global Flags
- 34:04Library
- 34:50Module Interface
- 35:50Dependencies
- 36:05Interface
- 37:42Patterns
- 40:15Feedback
- 41:01Other libraries
- 41:41External packages
- 47:50Syntax
- 48:54Target
- 50:43Flags
- 51:23Packages
- 51:55Questions
related talks
01h 02mModern CMake Modules
01h 01mClean CMake for C++ (library) developers
01h 02mDeep CMake for Library Authors
01h 17mThe Importance of the C++ Build System Target Model
01h 01mC++ Modules and Large-Scale Development (Part 1)
01h 04mBetter CMake: A World Tour of Build Systems - Better C++ Builds
01h 28mLink What You Include - Maintain a Coherent CMake Target Model
01h 01mGit, CMake, Conan - How to ship and reuse our C++ projects
