diff --git a/meson.build b/meson.build index 325f7cf70..cdb9e857e 100644 --- a/meson.build +++ b/meson.build @@ -26,24 +26,24 @@ check_funcs = [ ['round'], ] -freetype_dep = dependency('freetype2', required: false, +freetype_dep = dependency('freetype2', required: get_option('freetype'), fallback: ['freetype2', 'freetype_dep']) -glib_dep = dependency('glib-2.0', required: false, +glib_dep = dependency('glib-2.0', required: get_option('glib'), fallback: ['glib', 'libglib_dep']) -gobject_dep = dependency('gobject-2.0', required: false, +gobject_dep = dependency('gobject-2.0', required: get_option('gobject'), fallback: ['glib', 'libgobject_dep']) -cairo_dep = dependency('cairo', required: false, +cairo_dep = dependency('cairo', required: get_option('cairo'), fallback: ['cairo', 'libcairo_dep']) -fontconfig_dep = dependency('fontconfig', required: false, +fontconfig_dep = dependency('fontconfig', required: get_option('fontconfig'), fallback: ['fontconfig', 'fontconfig_dep']) -graphite2_dep = dependency('graphite2', required: false) -icu_dep = dependency('icu-uc', required: false) +graphite2_dep = dependency('graphite2', required: get_option('graphite')) +icu_dep = dependency('icu-uc', required: get_option('icu')) m_dep = cpp.find_library('m', required: false) # Ensure that cairo-ft is fetched from the same library as cairo itself if cairo_dep.found() if cairo_dep.type_name() == 'pkgconfig' - cairo_ft_dep = dependency('cairo-ft', required: false) + cairo_ft_dep = dependency('cairo-ft', required: get_option('cairo')) else cairo_ft_dep = cairo_dep endif diff --git a/meson_options.txt b/meson_options.txt new file mode 100644 index 000000000..967b1f696 --- /dev/null +++ b/meson_options.txt @@ -0,0 +1,21 @@ +# HarfBuzz feature options +option('glib', type: 'feature', value: 'auto', + description: 'Enable GLib unicode functions') +option('gobject', type: 'feature', value: 'disabled', + description: 'Enable GObject bindings') +option('cairo', type: 'feature', value: 'auto', + description: 'Use Cairo graphics library') +option('fontconfig', type: 'feature', value: 'auto', + description: 'Use fontconfig') +option('icu', type: 'feature', value: 'auto', + description: 'Enable ICU library unicode functions') +option('graphite', type: 'feature', value: 'disabled', + description: 'Enable Graphite2 complementary shaper') +option('freetype', type: 'feature', value: 'auto', + description: 'Enable freetype interop helpers') + +# Common feature options +#option('tests', type : 'feature', value : 'auto', yield : true, +# description: 'Enable or disable unit tests') +#option('introspection', type : 'feature', value : 'disabled', yield : true, +# description : 'Generate gobject-introspection bindings (.gir/.typelib files)') diff --git a/util/meson.build b/util/meson.build index 6a6220b2a..0c2e381e8 100644 --- a/util/meson.build +++ b/util/meson.build @@ -57,4 +57,8 @@ if conf.get('HAVE_GLIB', 0) == 1 link_with: [libharfbuzz], install: true, ) +else + # Disable tests that use this + hb_shape = disabler() + hb_subset = disabler() endif