# What targets/files does a specific component install?

**URL:** <https://discourse.cmake.org/t/what-targets-files-does-a-specific-component-install/2125>\
**Category:** Code\
**Created:** [November 5, 2020, 11:23am UTC](https://discourse.cmake.org/t/what-targets-files-does-a-specific-component-install/2125 "2020-11-05T11:23:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dbahadir](https://discourse.cmake.org/user_avatar/discourse.cmake.org/dbahadir/32/197_2.png) [@dbahadir](https://discourse.cmake.org/u/dbahadir)\
**Post date:** [November 5, 2020, 11:23am UTC](https://discourse.cmake.org/t/what-targets-files-does-a-specific-component-install/2125/1 "2020-11-05T11:23:13Z")

</div>

## Background and question

In my CMake project I am installing some built libraries and other files, all associated with several components (using the `install(... COMPONENT ...)` syntax).  
I then want to create (Debian) packages for these components with CPack.

However, in order to properly set some explicit package dependencies I need to read some properties from the targets belonging to a component.

**The problem is now that I see no way to find the list of targets (and other files) that are associated with (and installed by) a component.**

**Is there some (possibly undocumented) way to retrieve the list of targets/files which are installed by a specific component?**

* * *

### Bonus-question:

Although the `CPACK_DEBIAN_PACKAGE_SHLIBDEPS` and `CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS` variables are set to `ON`, only some of the package dependencies are discovered and automatically added to the list of package dependencies.  
However, some of the built and installed targets require _Boost_ libraries and link against them. (Even the Linux command `ldd` shows that the resulting libraries link against some _Boost_ libraries.) Still, the associated Boost packages are not picked up automatically as dependencies for the package which installs those targets.

**Why is this so?  
Is this so because the libraries are located in some non-standard location and/or were found by `find_package(Boost...)` (using additional hints)?**

* * *

Thanks for any hints.

---

<div class="post-metadata">

**Author:** ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)\
**Post date:** [November 25, 2020, 4:42pm UTC](https://discourse.cmake.org/t/what-targets-files-does-a-specific-component-install/2125/2 "2020-11-25T16:42:45Z")

</div>

I don’t believe so. Note that targets can be installed multiple times, so it can be part of multiple components.

I don’t know about the shlibs thing (though that sounds like a separate thread).

Cc: @kyle.edwards
