# Exporting packages with a custom Find module

**URL:** https://discourse.cmake.org/t/exporting-packages-with-a-custom-find-module/3820
**Category:** Code
**Created:** [July 23, 2021, 10:41am UTC](https://discourse.cmake.org/t/exporting-packages-with-a-custom-find-module/3820 "2021-07-23T10:41:11Z")
**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: [July 23, 2021, 11:56am UTC](https://discourse.cmake.org/t/exporting-packages-with-a-custom-find-module/3820/2 "2021-07-23T11:56:11Z")

</div>

I would do something like this:

```cmake
set(_mypackage_module_path_save "${CMAKE_MODULE_PATH}")
list(CMAKE_MODULE_PATH INSERT 0 "${CMAKE_CURRENT_LIST_DIR}/find_modules")

# Find modules

set(CMAKE_MODULE_PATH "${_mypackage_module_path_save}")
unset(_mypackage_module_path_save)

```

---

_[View the full topic](https://discourse.cmake.org/t/exporting-packages-with-a-custom-find-module/3820)._
