Add check for Freetype CMake target. If it is found:
- enable HB_HAVE_FREETYPE option
- add HAVE_FREETYPE=1 define
- bypass finding Freetype as cmake package
- add Freetype CMake target as dependency to harfbuzz
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.