c++vcpkg

What is baseline in vcpkg?


When writing vcpkg.json for a top-level project, I got the following error:

error: this vcpkg instance requires a manifest with a specified baseline in order to interact with ports. Please add 'builtin-baseline' to the manifest or add a 'vcpkg-configuration.json' that redefines the default registry.

What does baseline mean? I tried looking up the docs, and apparently it refers to a Git repo hash and is used for versioning, but what exactly does this mean? Wasn't able to find any details about this.


Solution

  • From versioning docs:

    Baselines define a global version floor for what versions will be considered.

    It's really nothing more than a git commit hash in a git registry (builtin registry aka vcpkg git repository is itself a git registry). Vcpkg uses it to extract version information for a port from baseline.json.

    For example, if we wanted to install qtbase: