CMake: Use find_package(PkgConfig) instead of direct include

This gets rid of the following warning:

```
CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:441 (message):
  The package name passed to `find_package_handle_standard_args` (PkgConfig)
  does not match the name of the calling package (HarfBuzz).  This can lead
  to problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPkgConfig.cmake:114 (find_package_handle_standard_args)
  aseprite/cmake/FindHarfBuzz.cmake:33 (include)
  CMakeLists.txt:173 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.
```

By applying the following change:
407fa892d9

The file could use further updates based on the upstream version.
This commit is contained in:
Thorbjørn Lindeijer 2025-09-12 11:36:17 +02:00 committed by David Capello
parent 689e1ff524
commit fae42dbe12
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@
# HARFBUZZ_INCLUDE_DIRS - containg the HarfBuzz headers # HARFBUZZ_INCLUDE_DIRS - containg the HarfBuzz headers
# HARFBUZZ_LIBRARIES - containg the HarfBuzz library # HARFBUZZ_LIBRARIES - containg the HarfBuzz library
include(FindPkgConfig) find_package(PkgConfig QUIET)
pkg_check_modules(PC_HARFBUZZ harfbuzz>=0.9.7) pkg_check_modules(PC_HARFBUZZ harfbuzz>=0.9.7)