# How do I list components available with \`cmake --install . --component ...\`?

**URL:** https://discourse.cmake.org/t/how-do-i-list-components-available-with-cmake-install-component/13982
**Category:** Usage
**Created:** [April 25, 2025, 10:49am UTC](https://discourse.cmake.org/t/how-do-i-list-components-available-with-cmake-install-component/13982 "2025-04-25T10:49:41Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![exoosh](https://discourse.cmake.org/user_avatar/discourse.cmake.org/exoosh/32/4077_2.png) [@exoosh](https://discourse.cmake.org/u/exoosh)
#### Post date: [April 25, 2025, 10:49am UTC](https://discourse.cmake.org/t/how-do-i-list-components-available-with-cmake-install-component/13982/1 "2025-04-25T10:49:42Z")

</div>

So I have a top-level `CMakeLists.txt` authored by “us” (our company) and plenty of subordinate `CMakeLists.txt` files which were mostly not authored by us.

Most of these contain an `install()`. Seemingly dozens if not hundreds of components.

Now all the advice I found on how to deal with this told me to pass `--component`. So I thought: well, this can’t be that hard. First I tried the target name, but apparently that’s a separate concept. And in script I wasn’t able to find whether there was a list of components to output.

So my question is: how can I get the component names from within a given build directory? What I was hoping for is something akin to `cmake --install . --component list` (or whatever other reserved word could be used to see the list). … without having to scour all of these “other” `CMakeLists.txt`, which isn’t trivial.

Thank you!

---

<div class="post-metadata">

### Author: ![ClausKlein](https://discourse.cmake.org/user_avatar/discourse.cmake.org/clausklein/32/352_2.png) [@ClausKlein](https://discourse.cmake.org/u/ClausKlein)
#### Post date: [February 17, 2026, 7:57pm UTC](https://discourse.cmake.org/t/how-do-i-list-components-available-with-cmake-install-component/13982/2 "2026-02-17T19:57:07Z")

</div>

**AFAIK** : It works with `Unix Makefiles` only yet:

```bash
bash-5.3$ make list_install_components 
Available install components are: "beman.exemplar" "beman.inplace_vector"
bash-5.3$ 

```
