cmake does not detect fmt package

image

> 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

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.

1 Like

The release 2.2.0 does not exits: Release 2.1.1 · fmtlib/fmt · GitHub ?

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