mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2024-12-24 21:33:51 +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:
parent
faae3a91ce
commit
915951b87b
10
meson.build
10
meson.build
@ -32,8 +32,10 @@ dir_locale = dir_prefix / get_option('localedir')
|
|||||||
|
|
||||||
host_os = host_machine.system()
|
host_os = host_machine.system()
|
||||||
|
|
||||||
|
bsd = ['freebsd', 'openbsd', 'dragonfly']
|
||||||
cygwin = 'cygwin'
|
cygwin = 'cygwin'
|
||||||
windows = 'windows'
|
windows = 'windows'
|
||||||
|
sys_bsd = bsd.contains(host_os)
|
||||||
sys_cygwin = cygwin.contains(host_os)
|
sys_cygwin = cygwin.contains(host_os)
|
||||||
sys_windows = windows.contains(host_os)
|
sys_windows = windows.contains(host_os)
|
||||||
|
|
||||||
@ -576,10 +578,12 @@ endif
|
|||||||
# icu
|
# icu
|
||||||
icu_dep = dependency('icu-i18n', method: 'pkg-config', required: get_option('icu'))
|
icu_dep = dependency('icu-i18n', method: 'pkg-config', required: get_option('icu'))
|
||||||
if icu_dep.found()
|
if icu_dep.found()
|
||||||
def_var = icu_dep.get_variable(pkgconfig: 'DEFS')
|
defs = icu_dep.get_variable(pkgconfig: 'DEFS')
|
||||||
config_dir += include_directories(def_var)
|
if cc.has_argument(defs)
|
||||||
xml_deps += icu_dep
|
libxml2_cflags += defs
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
xml_deps += icu_dep
|
||||||
|
|
||||||
subdir('include/libxml')
|
subdir('include/libxml')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user