Enable exceptions in ragel subproject, and revert the exceptions part of:
commit 22cbd038d3
Author: Khaled Hosny <khaled@aliftype.com>
Date: Tue Sep 14 12:34:25 2021 +0200
[meson] Add ragel subproject
To get ride of the following warnings:
cl : Command line warning D9025 : overriding '/EHs' with '/EHs-'
In #3811 / commit 53a194aa3f a broken and
half-implemented approach to kind of sort of handling the detection of
both pkg-config and cmake names for dependencies, was implemented. It
just checked for both versions with required: false, but when the build
was configured with *disabled* options, it was still found because it
was treated as auto.
Really, the problem here is trying to outsmart Meson, which handles a
lot of edge cases correctly. But it's possible, albeit very wordy, to
manually implement Meson's internal logic via if/else fallbacks. Do so
here.
It is wrong to search for a different name depending on the compiler. If
anything, cmake name could be available on systems that uses GCC too.
This also fix regression in the usage of freetype subproject fallback as
its name is "freetype2" and was previously used even when the
"freetype" option was set to "auto".
Nowadays Meson has much better CMake support which we can use to find
dependencies on Visual Studio builds (and Visual Studio 2017 and later provides
CMake as an optional install item), so we can use it to help us find ICU-UC
on Visual Studio builds, since CMake has built-in support for finding it by
the components we need for some time.
Nowadays, CMake is much better supported with Meson and is a common tool on
Windows (it is even an optionally-installed item for Visual Studio 2017+), so
make use of that to find FreeType. The package to search for, however, is
`freetype` instead of `freetype2`.
Update to the current master branch so that is has
cairo_user_font_face_set_render_color_glyph_func().
I had to disable optimized builds on win[32|64] crossbuild setups
because they are now broken in the CI (something about cairo defining
_FORTIFY_SOURCE for optimized builds that MingW does not like).
In some cases we need to add additionl defs to build against icu if
icu has certain options configured.
ICU warns about this when building:
*** WARNING: You must set the following flags before code compiled against this ICU will function properly:
-DU_DISABLE_RENAMING=1
We can fetch these flags from the icu pkgconfig and add them if
required.
This fixes symbol errors if ICU is built without renaming.