The Common Package Specification (CPS), now stable in CMake 4.3, is a JSON format for describing installed libraries across build systems like CMake, Meson, and autotools — not across language ecosystems as the name might imply. It replaces the fragmented mix of .pc files and *Config.cmake scripts. Conan can already generate CPS files for ConanCenter packages, and CMake's find_package() reads them. The author explores CPS's potential usefulness for binary dependency tracing, noting it provides version data that can't be reliably recovered from symbol tables. While Ruby's mkmf and node-gyp already use pkg-config for similar purposes, adoption of CPS outside CMake is minimal since most system libraries still ship .pc files. An open proposal to add purl identifiers to CPS files could bridge the build-system world with broader package identifier schemes. Python is tackling adjacent problems independently via PEP 770 (SBOM metadata in wheels) and PEP 725 (external dependency declarations in pyproject.toml), neither of which references CPS. The author notes these efforts are converging on compatible identifiers even without coordination.

4m read timeFrom nesbitt.io
Post cover image

Sort: