# What's the best way to include headers from FetchContent deps?

**URL:** https://discourse.cmake.org/t/whats-the-best-way-to-include-headers-from-fetchcontent-deps/7047
**Category:** Code
**Created:** [December 12, 2022, 1:04am UTC](https://discourse.cmake.org/t/whats-the-best-way-to-include-headers-from-fetchcontent-deps/7047 "2022-12-12T01:04:31Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![benthevining](https://discourse.cmake.org/user_avatar/discourse.cmake.org/benthevining/32/1924_2.png) [@benthevining](https://discourse.cmake.org/u/benthevining)
#### Post date: [December 12, 2022, 1:21am UTC](https://discourse.cmake.org/t/whats-the-best-way-to-include-headers-from-fetchcontent-deps/7047/2 "2022-12-12T01:21:15Z")

</div>

Just use targets. Your support libraries should have targets that you use like:

```cmake
target_link_libraries (aoc-2022 PRIVATE cgs fruity)

```

and that should be it. The `cgs` and `fruity` targets should set their own include directories, which propagate to targets that link against them.

---

_[View the full topic](https://discourse.cmake.org/t/whats-the-best-way-to-include-headers-from-fetchcontent-deps/7047)._
