Skip to content

build: Don't build HarfBuzz prematurely

Chun-wei Fan requested to merge hb-dont-fallback-too-early into master

Hi,

From the commit message:

For Visual Studio builds, since HarfBuzz is built with CMake until HarfBuzz 2.6.x yet we only require HarfBuzz 2.0.0 or later, we aren't able to find pre-2.6.x HarfBuzz using Meson's dependency() method as the support for CMake config files is not done or flaky in Meson.

As a result, we need to make sure that we first manually look for the HarfBuzz/HarfBuzz-GObject libraries before we attempt to use the fallback mechanism in Meson, so that we won't rebuild HarfBuzz unneccesarily.

This rebuild will also cause issues for older compilers that don't have enough support for C++11 as building Harfbuzz with Meson support requires a C++11 compiler, which was mandated in HarfBuzz 2.5.0.

The other part is that harfbuzz-gobject does not have a CMake config file of its own, so we would also end up rebuilding HarfBuzz, which will throw us back into square one.

With blessings, thank you!

Merge request reports