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

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]

Common Package Specification project page

References

  1. ^ Common Package Specification Overview
  2. ^ Common Package Specification is Out the Gate Matthew Woehlke, Bill Hoffman, Kitware Blog, 2026-03-19
  3. ^ Common Package Specification History
  4. ^ The work of WG21/SG15 - Tooling Harald Achitz, Blog post, 2024-11-16

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.