Blog112.8K views2,726 votes0 replies614 following
Stop Leaking Includes: Use PUBLIC PRIVATE INTERFACE in Modern CMake
Use target_include_directories and target_link_libraries with PUBLIC, PRIVATE and INTERFACE to encapsulate what a CMake target needs to build and what its consumers need to use it, preventing leaking includes and hidden coupling.
dependency-propagationtarget-propertiesmodern-cmakeTasadduq Burneyowner35.8K rep · 30 Nov 2025, 08:43 UTC