# find\_package: can't find "jansson" library

**URL:** https://discourse.cmake.org/t/find-package-cant-find-jansson-library/15711
**Category:** Usage
**Created:** [June 14, 2026, 12:34am UTC](https://discourse.cmake.org/t/find-package-cant-find-jansson-library/15711 "2026-06-14T00:34:44Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![bam](https://discourse.cmake.org/user_avatar/discourse.cmake.org/bam/32/6146_2.png) [@bam](https://discourse.cmake.org/u/bam)
#### Post date: [June 14, 2026, 12:34am UTC](https://discourse.cmake.org/t/find-package-cant-find-jansson-library/15711/1 "2026-06-14T00:34:44Z")

</div>

Hi, cmake can’t find “jansson” library:

```auto
[cmake] CMake Error at CMakeLists.txt:187 (find_package):
[cmake] Could not find a package configuration file provided by "jansson" with any
[cmake] of the following names:
[cmake] 
[cmake] jansson.cps
[cmake] janssonConfig.cmake
[cmake] jansson-config.cmake
[cmake] 
[cmake] Add the installation prefix of "jansson" to CMAKE_PREFIX_PATH or set
[cmake] "jansson_DIR" to a directory containing one of the above files. If
[cmake] "jansson" provides a separate development package or SDK, be sure it has
[cmake] been installed.

```

The dev package doesn’t have these files, indeed:

```auto
$ rpm -ql jansson-devel 
/usr/include/jansson.h
/usr/include/jansson_config.h
/usr/lib64/libjansson.so
/usr/lib64/pkgconfig/jansson.pc

```

I’m doubt who is the culprit here, any help?

---

<div class="post-metadata">

### Author: ![marc.chevrier](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/m/ecb155/32.png) [@marc.chevrier](https://discourse.cmake.org/u/marc.chevrier)
#### Post date: [June 17, 2026, 9:23am UTC](https://discourse.cmake.org/t/find-package-cant-find-jansson-library/15711/2 "2026-06-17T09:23:41Z")

</div>

From what you show, your package does not have a CMake package configuration file.

But you can exploit the `.pc` file by using the [FindPkgConfig](https://cmake.org/cmake/help/latest/module/FindPkgConfig.html) module.
