# Specify search path for find\_package

**URL:** https://discourse.cmake.org/t/specify-search-path-for-find-package/11580
**Category:** Usage
**Created:** [September 3, 2024, 5:55pm UTC](https://discourse.cmake.org/t/specify-search-path-for-find-package/11580 "2024-09-03T17:55:19Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![KSergeyP](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/k/8baadc/32.png) [@KSergeyP](https://discourse.cmake.org/u/KSergeyP)
#### Post date: [September 3, 2024, 5:55pm UTC](https://discourse.cmake.org/t/specify-search-path-for-find-package/11580/1 "2024-09-03T17:55:19Z")

</div>

How to specify search path for find\_package?  
I can add it to CMAKE\_MODULE\_PATH but if it is not there then the search continues in PATH - it is necessary that it searches only in the specified path.  
You can check the version of the package. But it is more difficult if there is the same version compiled with different settings.

---

<div class="post-metadata">

### Author: ![benthevining](https://discourse.cmake.org/user_avatar/discourse.cmake.org/benthevining/32/1924_2.png) [@benthevining](https://discourse.cmake.org/u/benthevining)
#### Post date: [September 3, 2024, 5:55pm UTC](https://discourse.cmake.org/t/specify-search-path-for-find-package/11580/2 "2024-09-03T17:55:50Z")

</div>

CMAKE\_PREFIX\_PATH
