1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-10-26 12:25:09 +03:00

meson: Improve ICU detection

Use CMake as well when looking for ICU-IN, as Visual Studio builds of
ICU4C do not generate pkg-config files for us and CMake has support for
helping us find ICU.

Use the "old" way of using components when finding ICU-IN with CMake ,
as Meson currently has issues using the 'modules:' directive against
ICU4C, and use the CMake way of constructing the cflags for building
against ICU for its include paths.
This commit is contained in:
Chun-wei Fan 2024-07-01 15:43:20 +08:00
parent 64685e9812
commit 493ed323cb

View File

@ -387,8 +387,8 @@ endif
# icu
if want_icu
icu_dep = dependency('icu-i18n', method: 'pkg-config')
defs = icu_dep.get_variable(pkgconfig: 'DEFS')
icu_dep = dependency('icu-i18n', 'ICU', components: 'uc')
defs = icu_dep.get_variable(pkgconfig: 'DEFS', cmake: 'ICU_INCLUDE_DIRS')
if cc.has_argument(defs)
libxml2_cflags += defs
endif