Unfortunately, newer CMake versions die during regex variable extraction, causing the build to fail.
This is caused by the lack of escaping used around variables in the extract_make_variable function, causing these variables to be automatically unwrapped into empty strings.
This disables fallback shaper in tiny builds. Projects that don't
use our build system and want to disable fallback shaper (eg. Firefox)
should define HB_NO_FALLBACK_SHAPE now.
Part of https://github.com/harfbuzz/harfbuzz/issues/1652
Added in 01dff1e and 19256bef, this was targeted at older
msvc versions that don't support C99 but now as we require
C++11 we don't target places those envs thus removing this.
Instead of passing a CFLAG/CXXFLAG to define HB_EXTERN, define it
directly in src/hb.hh as __declspec(dllexport) extern when we are
building HarfBuzz as DLLs on Visual Studio. Define HB_INTERNAL
as nothing without defining HB_NO_VISIBILITY when building HarfBuzz as
DLLs to avoid linker errors on Visual Studio builds.
Also "install" harfbuzz-subset.dll into $(PREFIX)\bin as the
hb-subset utility will depend on that DLL at runtime, when HarfBuzz is
built as DLLs. Since it consists of private APIs that are subject to
change, we do not install its headers nor .lib file.
When building with the auto tools, the manually mantained
harfbuzz-config.cmake is installed. When building with cmake, we can use
cmake to generate the correct config files for us and install them.
The list of source files to pass to g-ir-scanner is becoming too
long for Windows, as Windows imposes a 8192-character limit for command
lines, so we need to first transform that list into a listings file, and
then use the --filelist option for g-ir-scanner to build the
introspection files.
Not all the compilers that HarfBuzz is buildable on supports round() and
has the header stdbool.h, so we check for them and define HAVE_ROUND and
HAVE_STDBOOL_H repsectively in our CFLAGS so that we include them only
when they are found, or use fallback implementations when necessary.
Also include FindPythonInterp earlier as we need PYTHON_EXECUTABLE to be
set for running the tests.