# How to vend dependency information/configuration

**URL:** https://discourse.cmake.org/t/how-to-vend-dependency-information-configuration/10319
**Category:** Usage
**Created:** [March 7, 2024, 7:35pm UTC](https://discourse.cmake.org/t/how-to-vend-dependency-information-configuration/10319 "2024-03-07T19:35:42Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![dabrahams](https://discourse.cmake.org/user_avatar/discourse.cmake.org/dabrahams/32/4265_2.png) [@dabrahams](https://discourse.cmake.org/u/dabrahams)
#### Post date: [March 22, 2024, 7:00pm UTC](https://discourse.cmake.org/t/how-to-vend-dependency-information-configuration/10319/5 "2024-03-22T19:00:13Z")

</div>

[This](https://discourse.cmake.org/t/how-to-vend-dependency-information-configuration/10319/4) is the strategy I’m currently pursuing.

Now I’d like to ask about the true meaning of the passage I [quoted](https://discourse.cmake.org/t/how-to-vend-dependency-information-configuration/10319/3) from the [FetchContent documentation](https://cmake.org/cmake/help/latest/module/FetchContent.html) that begins:

> Content population details should be defined separately from the command that performs the actual population.

I assumed that this idea explains why `FetchContent` usage is always two-phase: first a `_Declare` call and then (normally) a `_MakeAvailable` call. But if I pursue the strategy above, I’m going to end up creating and calling a single function that does both parts. And I don’t really understand why that would be a problem.

The doc goes on to give this rationale:

> This separation ensures that all the dependency details are defined before anything might try to use them to populate content. This is particularly important in more complex project hierarchies where dependencies may be shared between multiple projects.

But it seems to me that if top-level projects always determine all the dependencies, as @ben.boeckel [confirmed](https://discourse.cmake.org/t/relationship-between-fetchcontent-and-externalproject/10162/6) is the way to do things, that separation becomes irrelevant.

Lastly, it seems as though, even if I don’t follow the top-level-owns-dependency-resolution pattern, there’s no obvious pattern of usage that would let me take advantage of the separation that the FetchContent docs are advocating.

This is so confusing. Am I misunderstanding what the doc means by “separation?”

---

_[View the full topic](https://discourse.cmake.org/t/how-to-vend-dependency-information-configuration/10319)._
