diff --git a/docs/harfbuzz-sections.txt b/docs/harfbuzz-sections.txt index bcf5e024f..930cf5479 100644 --- a/docs/harfbuzz-sections.txt +++ b/docs/harfbuzz-sections.txt @@ -172,6 +172,7 @@ HB_HAS_DIRECTWRITE HB_HAS_FREETYPE HB_HAS_GDI HB_HAS_GLIB +HB_HAS_GOBJECT HB_HAS_GRAPHITE HB_HAS_ICU HB_HAS_UNISCRIBE diff --git a/src/Makefile.am b/src/Makefile.am index 0f0e2e988..52bd92b79 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -254,6 +254,9 @@ hb-gobject-enums.%: hb-gobject-enums.%.tmpl $(HBHEADERS) --template $^ | \ sed 's/_t_get_type/_get_type/g; s/_T (/ (/g' > "$@" \ || ($(RM) "$@"; false) +HB_HAS_GOBJECT_DEF = define HB_HAS_GOBJECT 1 +else +HB_HAS_GOBJECT_DEF = undef HB_HAS_GOBJECT endif EXTRA_DIST += \ harfbuzz-gobject.pc.in \ @@ -275,6 +278,7 @@ hb-features.h: hb-features.h.in $(top_builddir)/config.status -e 's/mesondefine HB_HAS_GDI/$(HB_HAS_GDI_DEF)/' \ -e 's/mesondefine HB_HAS_GRAPHITE/$(HB_HAS_GRAPHITE_DEF)/' \ -e 's/mesondefine HB_HAS_GLIB/$(HB_HAS_GLIB_DEF)/' \ + -e 's/mesondefine HB_HAS_GOBJECT/$(HB_HAS_GOBJECT_DEF)/' \ -e 's/mesondefine HB_HAS_UNISCRIBE/$(HB_HAS_UNISCRIBE_DEF)/' \ -e 's/mesondefine HB_HAS_DIRECTWRITE/$(HB_HAS_DIRECTWRITE_DEF)/' \ -e 's/mesondefine HB_HAS_CORETEXT/$(HB_HAS_CORETEXT_DEF)/' \ diff --git a/src/hb-features.h.in b/src/hb-features.h.in index 1c936d27b..da67f772f 100644 --- a/src/hb-features.h.in +++ b/src/hb-features.h.in @@ -70,6 +70,13 @@ HB_BEGIN_DECLS */ #mesondefine HB_HAS_GLIB +/** + * HB_HAS_GOBJECT: + * + * Defined if Harfbuzz has been built with GObject support. + */ +#mesondefine HB_HAS_GOBJECT + /** * HB_HAS_GRAPHITE: * diff --git a/src/meson.build b/src/meson.build index 1dd37c42c..e649a094c 100644 --- a/src/meson.build +++ b/src/meson.build @@ -438,6 +438,10 @@ if conf.get('HAVE_GLIB', 0) == 1 hb_features.set('HB_HAS_GLIB', 1) endif +if conf.get('HAVE_GOBJECT', 0) == 1 + hb_features.set('HB_HAS_GOBJECT', 1) +endif + # We set those here to not include the sources below that are of no use to # GObject Introspection gir_sources = hb_sources + hb_gobject_sources