Open ipiqueras opened 6 months ago
@ipiqueras let me know if I understood correctly.
foo
that has a vcpkg-configuration
object in its vcpkg.json
file. bar
that adds a dependency on foo
. If that's the case, then the vcpkg-configuration
on foo
is ignored and that is by design.
vcpkg only reads configuration from the top-level manifest (vpckg.json
). You have to add the old-Boost baseline registry in a vcpkg-configuration.json
file in your project's (bar
's) directory or set the registries in bar
's vcpkg-configuration
object.
Can't you, in foo's vcpkg.json, just do:
"dependencies": [
{"name": "boost-filesystem", "version==": "1.76.0", "platform": "native"}
]
?
Or maybe using an "override" - looks like the situation is a lot more complicated (https://devblogs.microsoft.com/cppblog/take-control-of-your-vcpkg-dependencies-with-versioning-support/) but that blog post should help you. It also mentions that overrides are not transitive so perhaps that means you need to add an override to bar
's, not to foo
's vcpkg.json (which is counter-intuitive to me, but oh well).
Type of issue
Missing information
Description
I'm reading how to install a specific version for Boost libraries and, it works fine.
What is not described is how to consume a port, in a private registry, that depends on a specific version of Boost. Say that you have a port
foo
that depends on some old Boost 1.76.0.So far I have tried using
vcpkg-configuration
property inports/foo/portfile.cmake
and, setting a baseline there:In the consuming project (let's call it
bar
):The "Fetching registry information from" is only printed once and, uses the baseline configured for the registry in
bar
, which brings newer Boost versions.I also tried a combination of
vcpkg-configuration
andoverrides
, without success.Page URL
https://learn.microsoft.com/en-us/vcpkg/consume/boost-versions
Content source URL
https://github.com/Microsoft/vcpkg-docs/blob/main/vcpkg/consume/boost-versions.md
Document Version Independent Id
efdb8438-0860-24e8-c015-44fda7053a6a
Article author
@vicroms
Metadata