# Where is find\_package() finding the package?

**URL:** https://discourse.cmake.org/t/where-is-find-package-finding-the-package/6150
**Category:** Usage
**Created:** [July 26, 2022, 4:25pm UTC](https://discourse.cmake.org/t/where-is-find-package-finding-the-package/6150 "2022-07-26T16:25:02Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![tomoreilly](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/t/439d5e/32.png) [@tomoreilly](https://discourse.cmake.org/u/tomoreilly)
#### Post date: [July 26, 2022, 4:25pm UTC](https://discourse.cmake.org/t/where-is-find-package-finding-the-package/6150/1 "2022-07-26T16:25:02Z")

</div>

Does cmake provide some way of knowing exactly where find\_package(X) finds package X? E.g. can I find the installation location of package X files on my machine after calling find\_package(X)?  
Thanks!

---

<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: [July 26, 2022, 4:35pm UTC](https://discourse.cmake.org/t/where-is-find-package-finding-the-package/6150/2 "2022-07-26T16:35:06Z")

</div>

For a `config.cmake`-using project, `X_DIR` should be reliable at that point.

If you just want to know in general, there is the `--debug-find` flag to CMake itself.

---

<div class="post-metadata">

### Author: ![tomoreilly](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/t/439d5e/32.png) [@tomoreilly](https://discourse.cmake.org/u/tomoreilly)
#### Post date: [July 26, 2022, 4:51pm UTC](https://discourse.cmake.org/t/where-is-find-package-finding-the-package/6150/3 "2022-07-26T16:51:07Z")

</div>

Great, thanks, that works!  
[And I see it documented too](https://cmake.org/cmake/help/latest/command/find_package.html) - if only I would read the documentation! 😉
