# How to create pkgconfig file

**URL:** https://discourse.cmake.org/t/how-to-create-pkgconfig-file/10337
**Category:** Code
**Created:** [March 9, 2024, 4:27pm UTC](https://discourse.cmake.org/t/how-to-create-pkgconfig-file/10337 "2024-03-09T16:27:05Z")
**Posts on this page:** 1
**Showing post:** 25

<div class="post-metadata">

### Author: ![ClausKlein](https://discourse.cmake.org/user_avatar/discourse.cmake.org/clausklein/32/352_2.png) [@ClausKlein](https://discourse.cmake.org/u/ClausKlein)
#### Post date: [March 10, 2024, 7:09pm UTC](https://discourse.cmake.org/t/how-to-create-pkgconfig-file/10337/25 "2024-03-10T19:09:48Z")

</div>

> [@Peter\_Featherstone](#):
>
> Not very modern cmake though

You will have the same problems when exporting a `CMake config package`:

you have to write the `find_dependency()` calls.

see [Installed module library can't find imported headers [Ubuntu 22.04 LTS, CMake 3.28.1, Ninja 1.11.1 and Clang 17.0.6] - #18 by ben.boeckel](https://discourse.cmake.org/t/installed-module-library-cant-find-imported-headers-ubuntu-22-04-lts-cmake-3-28-1-ninja-1-11-1-and-clang-17-0-6/9819/18)

---

_[View the full topic](https://discourse.cmake.org/t/how-to-create-pkgconfig-file/10337)._
