'disabled' wasn't implemented for some of the features so they were
getting found even with explicit -Dfeature=disabled, this implements it.
Run the following command to test this change and check whether 'disabled'
was actually effective,
meson build -Dglib=disabled -Dgobject=disabled -Dcairo=disabled -Dfontconfig=disabled -Dicu=disabled -Dfreetype=disabled -Dintrospection=disabled -Dgtk_doc=disabled
This is useful when one wants to integrate harfbuzz into another project via
meson's subproject mechanism.
Instead of passing dependencies as required we used one giant shared
dependency list containing all dependencies for every library/executable.
While this kinda works, the specified deps are also used for generating
the pkg-config files and this leads to lots of Requires.private and Libs.private
entries which aren't really needed.
This removes the "deps" array and replaces it with a few smaller ones and
makes sure the public libraries only get passed the dependencies actually
needed.
Fixes#2441
As a part of meson migration, this builds hb-shape dependencies
using meson subprojects and removes different unrelated mingw
files we've put on source root about things that aren't really our
concern. This also simplifies all the instructions we've put in
README.mingw.md and makes it easy to build the project on
distros that no mingw libraries (such i686-win32-{freetype,glib,...}
are packaged. The known catch is however lack of hb-view as its need
for build of cairo which apparently isn't that straightforward.
This adds a seperate library like with autotools.
This also fixes the ico feature option which was just set to required:false
when disabled instead of really disabling it.
Disabling is still broken with msvc because it then tries to find the library
another way, but that's broken for all other deps as well so I left it as is.
For tests only test-unicode.c is using icu specific functions so split it out
into its own category which depends on harfbuzz-icu.
Fixes#2338
Fixes compiler warning
test-unicode.c:589:1: warning: ‘test_unicode_properties_lenient’ defined but not used
which didn't happen with autotools.
Reason it does with meson is that the setup for C was slightly wrong.
We would only add -DHAVE_CONFIG_H to cpp_args which is only valid when
compiling C++ code, but not plain C code, and many of these tests were
plain C.
Instead pass -DHAVE_CONFIG_H via add_project_arguments() and make sure
to set both c_args and cpp_args when building test executables.
Fixes https://github.com/harfbuzz/harfbuzz/issues/2257
...and supersede the configuration option uniscribe with gdi, as Uniscribe is
tightly tied to GDI. This means that enabling GDI would also mean enabling
Uniscribe.
Since Cairo's build system for Visual Studio does not generate pkg-config files
for us, look for cairo.h and cairo.lib manually if the pkg-config files cannot
be found.
Also look for cairo-ft more carefully: ensure that we have cairo-ft.h, and one
of its symbols can be found in the same cairo.lib that we previously found.
ICU's Visual Studio build files do not generate pkg-config files for us, unless
it is built with Cygwin instead of the project files. If pkg-config files for
ICU cannot be found, look for its headers and .lib manually.