# Install findPackage script

**URL:** https://discourse.cmake.org/t/install-findpackage-script/5307
**Category:** Code
**Created:** [March 28, 2022, 8:27am UTC](https://discourse.cmake.org/t/install-findpackage-script/5307 "2022-03-28T08:27:50Z")
**Posts on this page:** 1
**Showing post:** 2

<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: [March 29, 2022, 1:28pm UTC](https://discourse.cmake.org/t/install-findpackage-script/5307/2 "2022-03-29T13:28:03Z")

</div>

Shipping your own `Find` modules is fine.

> [@Leon0402](#):
>
> Install it in the same directory as my Config Script

I’d recommend a subdirectory just to keep it more obvious what is what.

> [@Leon0402](#):
>
> In my config script set the cmake module path to the current directory

Yep. I’d recommend removing it after you’ve completed it though. See the discussion here:

> [@Can't export top level lib with dependency on subdir lib](https://discourse.cmake.org/t/cant-export-top-level-lib-with-dependency-on-subdir-lib/1084/21):
>
> They should just need to do find\_package(yourprogram). yourprogram-config.cmake does find\_package() for your dependencies to bring in their imported targets. I usually add them to cmake in the source tree and beside yourpackage-config.cmake in the build/install tree. Just scope it so your Find modules don’t interfere with the caller’s. set(CMAKE\_MODULE\_PATH\_save "${CMAKE\_MODULE\_PATH}") list(INSERT CMAKE\_MODULE\_PATH 0 "${CMAKE\_CURRENT\_LIST\_DIR}") # Any find\_packages you need. set(CMAKE\_MODULE…

---

_[View the full topic](https://discourse.cmake.org/t/install-findpackage-script/5307)._
