Skip to content

[harfbuzz] CMake targets #51451

@ajtribick

Description

@ajtribick

Is your feature request related to a problem? Please describe.

The harfbuzz::harfbuzz target generated in harfbuzzConfig.cmake.in has a few issues:

  • freetype is always linked to the harfbuzz::harfbuzz target regardless of whether this is in the list of features
  • cairo, coretext, and directwrite are never taken into account when setting dependencies of harfbuzz::harfbuzz

I think the harfbuzz::harfbuzz-subset target is ok.

There are also several targets that are generated by the upstream CMakeLists.txt file (which isn't used by vcpkg, preferring the Meson build) that are not produced:

  • harfbuzz::harfbuzz-icu
  • harfbuzz::harfbuzz-cairo
  • harfbuzz::harfbuzz-gobject
  • harfbuzz::harfbuzz-gpu
  • harfbuzz::harfbuzz-raster (should be linked to png if the relevant feature is enabled)
  • harfbuzz::harfbuzz-vector (should be linked to zlib if the relevant feature is enabled)

I am not sure whether or not these should get an unofficial:: prefix, given that upstream does supply a build system that generates them, just not the main build system.

Proposed solution

Update the build to create/link the appropriate targets. Maybe it is possible to use the .pc files to generate the appropriate dependencies, rather than reconstructing them in harfbuzzConfig.cmake.in?

Describe alternatives you've considered

Give up and just rely on pkg-config. Maybe not so great for Windows?

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    category:port-featureThe issue is with a library, which is requesting new capabilities that didn’t exist

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions