From daab4bf63a6ce1a519173aee5ddfbf17318cf2b8 Mon Sep 17 00:00:00 2001 From: James Hilliard Date: Mon, 17 Jan 2022 18:28:39 -0700 Subject: [PATCH] [meson] add icu DEFS required for compilation 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. --- meson.build | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meson.build b/meson.build index 131f15518..41344b3a3 100644 --- a/meson.build +++ b/meson.build @@ -123,6 +123,13 @@ if not get_option('icu').disabled() endif endif +if icu_dep.found() + icu_defs = icu_dep.get_variable(pkgconfig: 'DEFS', default_value: '') + if icu_defs != '' + add_project_arguments(icu_defs, language: ['c', 'cpp']) + endif +endif + cairo_dep = null_dep cairo_ft_dep = null_dep if not get_option('cairo').disabled()