1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-12-23 17:33:50 +03:00

meson: add DEFS to CFLAGS

Adding a configuration flag as an include directory is wrong and errors
on BSDs.

ERROR: Include dir -DU_DISABLE_RENAMING=1 does not exist.

Matches the autotools build now.

Requires has_argument to fix non BSDs because of an annoying meson
quirk.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2024-06-16 18:19:42 -07:00
parent faae3a91ce
commit 915951b87b

View File

@ -32,8 +32,10 @@ dir_locale = dir_prefix / get_option('localedir')
host_os = host_machine.system()
bsd = ['freebsd', 'openbsd', 'dragonfly']
cygwin = 'cygwin'
windows = 'windows'
sys_bsd = bsd.contains(host_os)
sys_cygwin = cygwin.contains(host_os)
sys_windows = windows.contains(host_os)
@ -576,10 +578,12 @@ endif
# icu
icu_dep = dependency('icu-i18n', method: 'pkg-config', required: get_option('icu'))
if icu_dep.found()
def_var = icu_dep.get_variable(pkgconfig: 'DEFS')
config_dir += include_directories(def_var)
xml_deps += icu_dep
defs = icu_dep.get_variable(pkgconfig: 'DEFS')
if cc.has_argument(defs)
libxml2_cflags += defs
endif
endif
xml_deps += icu_dep
subdir('include/libxml')