The included CMake configuration file (in /usr/lib64/cmake/harfbuzz/harfbuzz-config.cmake) is broken - it appears to contain unsubstituted autoconf variables. Reproducible: Always Steps to Reproduce: 1. build something attempting to pull in harfbuzz via CMake - find_package(harfbuzz REQUIRED) Actual Results: CMake Error at /usr/lib64/cmake/harfbuzz/harfbuzz-config.cmake:1: Parse error. Expected a command name, got unquoted argument with text "@PACKAGE_INIT@". Call Stack (most recent call first): makefiles/TPSDKs.cmake:68 (find_package) CMakeLists.txt:197 (include) CMake Error at makefiles/TPSDKs.cmake:68 (find_package): find_package Error reading CMake code from "/usr/lib64/cmake/harfbuzz/harfbuzz-config.cmake". Call Stack (most recent call first): CMakeLists.txt:197 (include) -- Configuring incomplete, errors occurred! Expected Results: Not produce errors Looking at the RPMs, this is broken in F40 - both 8.3.0 and 8.4.0 - but looks fine in F39's 8.2.1-2 I suspect the upstream change https://github.com/harfbuzz/harfbuzz/commit/da9b838910e62825717a8b2de8ce9c92e396136e broke it by rewriting the file
A bit more reading suggests to me the CMake config file may only be generated correctly when using Meson or CMake as a build system for harfbuzz - the autoconf build (that upstream seems to want to move away from, but is used by Fedora) seems not to set the right variables for the upstream rewritten harfbuzz-config.cmake.in file
*** Bug 2279802 has been marked as a duplicate of this bug. ***
Here is my preliminary analysis -> I agree here what Michael Cullen has found. I tested these 2 builds harfbuzz-8.2.1-2 harfbuzz-8.4.0 by building them on F38, F39 and F40 releases. CMake config file is broken since harbufzz-8.3.0 release on any Fedora release system. Also, as per comment on one of the upstream issue -> The cmake build is “community maintained” as none of HarfBuzz current maintainers knows cmake or uses it, if you know how to fix this issue please submit a PR.
Maybe something that can give some clue is that the build system for harfbuzz seems to be now meson. Probably autotools still works, but with potentially broken builds. I looked into the Debian package, which has a working cmake configuration and indeed they use meson to create the harfbuzz-config.cmake file.