[meson] use null_dep idiom
This commit is contained in:
parent
05ab073d9b
commit
f2a80ab2c2
15
meson.build
15
meson.build
|
@ -16,6 +16,7 @@ hb_libtool_version_info = '@0@:0:@0@'.format(hb_version_int)
|
||||||
|
|
||||||
pkgmod = import('pkgconfig')
|
pkgmod = import('pkgconfig')
|
||||||
cpp = meson.get_compiler('cpp')
|
cpp = meson.get_compiler('cpp')
|
||||||
|
null_dep = dependency('', required: false)
|
||||||
|
|
||||||
if cpp.get_id() == 'msvc'
|
if cpp.get_id() == 'msvc'
|
||||||
# Ignore several spurious warnings for things HarfBuzz does very commonly.
|
# Ignore several spurious warnings for things HarfBuzz does very commonly.
|
||||||
|
@ -89,7 +90,7 @@ if not get_option('freetype').disabled()
|
||||||
default_options: ['harfbuzz=disabled'])
|
default_options: ['harfbuzz=disabled'])
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
freetype_dep = dependency('', required: false)
|
freetype_dep = null_dep
|
||||||
endif
|
endif
|
||||||
|
|
||||||
glib_dep = dependency('glib-2.0', required: get_option('glib'),
|
glib_dep = dependency('glib-2.0', required: get_option('glib'),
|
||||||
|
@ -126,7 +127,7 @@ if not get_option('icu').disabled()
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
icu_dep = dependency('', required: false)
|
icu_dep = null_dep
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if not get_option('cairo').disabled()
|
if not get_option('cairo').disabled()
|
||||||
|
@ -160,11 +161,11 @@ if not get_option('cairo').disabled()
|
||||||
cairo_ft_dep = dependency('cairo-ft', required: get_option('cairo'))
|
cairo_ft_dep = dependency('cairo-ft', required: get_option('cairo'))
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
cairo_ft_dep = dependency('', required: false)
|
cairo_ft_dep = null_dep
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
cairo_dep = dependency('', required: false)
|
cairo_dep = null_dep
|
||||||
cairo_ft_dep = dependency('', required: false)
|
cairo_ft_dep = null_dep
|
||||||
endif
|
endif
|
||||||
|
|
||||||
conf = configuration_data()
|
conf = configuration_data()
|
||||||
|
@ -248,7 +249,7 @@ if host_machine.system() == 'windows' and not get_option('gdi').disabled()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# DirectWrite (windows)
|
# DirectWrite (windows)
|
||||||
directwrite_dep = dependency('', required: false)
|
directwrite_dep = null_dep
|
||||||
if host_machine.system() == 'windows' and not get_option('directwrite').disabled()
|
if host_machine.system() == 'windows' and not get_option('directwrite').disabled()
|
||||||
if cpp.has_header('dwrite_1.h')
|
if cpp.has_header('dwrite_1.h')
|
||||||
directwrite_dep = cpp.find_library('dwrite', required: true)
|
directwrite_dep = cpp.find_library('dwrite', required: true)
|
||||||
|
@ -281,7 +282,7 @@ if host_machine.system() == 'darwin' and not get_option('coretext').disabled()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# threads
|
# threads
|
||||||
thread_dep = dependency('', required: false)
|
thread_dep = null_dep
|
||||||
if host_machine.system() != 'windows'
|
if host_machine.system() != 'windows'
|
||||||
thread_dep = dependency('threads', required: false)
|
thread_dep = dependency('threads', required: false)
|
||||||
|
|
||||||
|
|
|
@ -537,7 +537,7 @@ if have_icu and not have_icu_builtin
|
||||||
|
|
||||||
install_headers(hb_icu_headers, subdir: meson.project_name())
|
install_headers(hb_icu_headers, subdir: meson.project_name())
|
||||||
else
|
else
|
||||||
libharfbuzz_icu_dep = dependency('', required: false)
|
libharfbuzz_icu_dep = null_dep
|
||||||
endif
|
endif
|
||||||
|
|
||||||
have_gobject = conf.get('HAVE_GOBJECT', 0) == 1
|
have_gobject = conf.get('HAVE_GOBJECT', 0) == 1
|
||||||
|
@ -654,7 +654,7 @@ else
|
||||||
error('introspection requires gobject to be enabled')
|
error('introspection requires gobject to be enabled')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
libharfbuzz_gobject_dep = dependency('', required: false)
|
libharfbuzz_gobject_dep = null_dep
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('tests').enabled()
|
if get_option('tests').enabled()
|
||||||
|
|
Loading…
Reference in New Issue