# cmake does not detect fmt package

**URL:** https://discourse.cmake.org/t/cmake-does-not-detect-fmt-package/11248
**Category:** Usage
**Created:** [July 14, 2024, 11:37am UTC](https://discourse.cmake.org/t/cmake-does-not-detect-fmt-package/11248 "2024-07-14T11:37:22Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![solomoncyj](https://discourse.cmake.org/user_avatar/discourse.cmake.org/solomoncyj/32/4765_2.png) [@solomoncyj](https://discourse.cmake.org/u/solomoncyj)
#### Post date: [July 14, 2024, 11:37am UTC](https://discourse.cmake.org/t/cmake-does-not-detect-fmt-package/11248/1 "2024-07-14T11:37:22Z")

</div>

![image](https://discourse.cmake.org/uploads/default/original/2X/b/b6353e69019b63906180720086d96e7016dca00d.png)

```auto
> cmake -S . -B build -G Ninja
Running CMake on dnf5...
Building dnf5 version 5.2.4.0
-- Checking for module 'fmt'
-- Package 'fmt' not found
CMake Error at /usr/local/share/cmake-3.30/Modules/FindPkgConfig.cmake:645 (message):
  The following required packages were not found:

   - fmt

Call Stack (most recent call first):
  /usr/local/share/cmake-3.30/Modules/FindPkgConfig.cmake:873 (_pkg_check_modules_internal)
  libdnf5/CMakeLists.txt:64 (pkg_check_modules)

-- Configuring incomplete, errors occurred!
> pkgconf --version fmt
2.2.0
```

---

<div class="post-metadata">

### Author: ![craig.scott](https://discourse.cmake.org/user_avatar/discourse.cmake.org/craig.scott/32/20_2.png) [@craig.scott](https://discourse.cmake.org/u/craig.scott)
#### Post date: [July 14, 2024, 11:17pm UTC](https://discourse.cmake.org/t/cmake-does-not-detect-fmt-package/11248/2 "2024-07-14T23:17:05Z")

</div>

MODERATOR NOTE: Please post the actual text, not a screenshot. Text can be searched, images won’t be, and screenshots tend to have far lower probability of someone responding.

You haven’t showed your project’s CMakeLists.txt file, so it will be hard for someone to help you. We would need to see how your project is trying to find fmt, and potentially whatever else your project is doing leading up to that point in the CMakeLists.txt file.

---

<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: [July 15, 2024, 5:19pm UTC](https://discourse.cmake.org/t/cmake-does-not-detect-fmt-package/11248/3 "2024-07-15T17:19:43Z")

</div>

The release 2.2.0 does not exits: [Release 2.1.1 · fmtlib/fmt · GitHub](https://github.com/fmtlib/fmt/releases/tag/2.1.1) ?

I have installed `fmt v.11.01` and this is the result on **OSX** :  
**pkg-config --exact-version=11.0.1 --print-errors fmt**

**Requested ‘fmt = 11.0.1’ but version of fmt is 5.3.0**

**pkg-config --version**

**0.29.2**
