Common Package Specification
The Common Package Specification is an open file standard to describe how to use a software package. It is based on JSON and allows build systems to discover dependencies and link applications independent of how the package was originally generated.
The CPS file contains information for a library like its version, file name of its dynamic library, or software license. Every library must provide its own CPS file which has to be distributed together with the library. Build systems of consuming software projects search for CPS files and use the information to verify that version constrains are fulfilled, which flags to use, and where to find the library. While the development is driven by Kitware employees, the company behind CMake, it is tool agnostic.[1] CMake started to support CPS in an experimental form in 4.0; since version 4.3 it is no longer experimental.[2]
History
[edit]Every build system handled dependencies in their specific way. GNOME tried to introduce an universal approach with gnome-config. This was later replaced by pkg-config. Independently, CMake relied on find modules to identify location of headers, libraries, and required build flags. Later CMake config files were preferred as they are provided by libraries themselves. CPS tries to fix problems of these older approaches.[3] The work on CPS started from the C++ committee's tooling working group SG15.[4]
Weblinks
[edit]References
[edit]- ↑ Common Package Specification Overview
- ↑ Common Package Specification is Out the Gate Matthew Woehlke, Bill Hoffman, Kitware Blog, 2026-03-19
- ↑ Common Package Specification History
- ↑ The work of WG21/SG15 - Tooling Harald Achitz, Blog post, 2024-11-16