# Let CMakeLists search .pc instead of .cmake?

**URL:** https://discourse.cmake.org/t/let-cmakelists-search-pc-instead-of-cmake/3810
**Category:** Usage
**Tags:** os:linux
**Created:** [July 22, 2021, 1:04am UTC](https://discourse.cmake.org/t/let-cmakelists-search-pc-instead-of-cmake/3810 "2021-07-22T01:04:29Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![jiapei100](https://discourse.cmake.org/user_avatar/discourse.cmake.org/jiapei100/32/1655_2.png) [@jiapei100](https://discourse.cmake.org/u/jiapei100)
#### Post date: [July 22, 2021, 1:04am UTC](https://discourse.cmake.org/t/let-cmakelists-search-pc-instead-of-cmake/3810/1 "2021-07-22T01:04:29Z")

</div>

Hi, all:

I wonder if there is a convenient way to let **CMakeLists.txt** search for packages installed with **ONLY**  **.pc** (package config) files, instead of **.cmake** files?

It seems `find_package()` can **ONLY** search those packages with **.cmake**?

Thank you

---

<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 22, 2021, 2:52am UTC](https://discourse.cmake.org/t/let-cmakelists-search-pc-instead-of-cmake/3810/2 "2021-07-22T02:52:15Z")

</div>

There is the [`FindPkgConfig`](https://cmake.org/cmake/help/latest/module/FindPkgConfig.html) module to do this. But `find_package` only looks for CMake packages.
