[features] Add HB_HAS_GOBJECT

This commit is contained in:
Behdad Esfahbod 2023-01-22 14:01:34 -07:00
parent b3006ba9cb
commit def94aa8c5
4 changed files with 16 additions and 0 deletions

View File

@ -172,6 +172,7 @@ HB_HAS_DIRECTWRITE
HB_HAS_FREETYPE HB_HAS_FREETYPE
HB_HAS_GDI HB_HAS_GDI
HB_HAS_GLIB HB_HAS_GLIB
HB_HAS_GOBJECT
HB_HAS_GRAPHITE HB_HAS_GRAPHITE
HB_HAS_ICU HB_HAS_ICU
HB_HAS_UNISCRIBE HB_HAS_UNISCRIBE

View File

@ -254,6 +254,9 @@ hb-gobject-enums.%: hb-gobject-enums.%.tmpl $(HBHEADERS)
--template $^ | \ --template $^ | \
sed 's/_t_get_type/_get_type/g; s/_T (/ (/g' > "$@" \ sed 's/_t_get_type/_get_type/g; s/_T (/ (/g' > "$@" \
|| ($(RM) "$@"; false) || ($(RM) "$@"; false)
HB_HAS_GOBJECT_DEF = define HB_HAS_GOBJECT 1
else
HB_HAS_GOBJECT_DEF = undef HB_HAS_GOBJECT
endif endif
EXTRA_DIST += \ EXTRA_DIST += \
harfbuzz-gobject.pc.in \ 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_GDI/$(HB_HAS_GDI_DEF)/' \
-e 's/mesondefine HB_HAS_GRAPHITE/$(HB_HAS_GRAPHITE_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_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_UNISCRIBE/$(HB_HAS_UNISCRIBE_DEF)/' \
-e 's/mesondefine HB_HAS_DIRECTWRITE/$(HB_HAS_DIRECTWRITE_DEF)/' \ -e 's/mesondefine HB_HAS_DIRECTWRITE/$(HB_HAS_DIRECTWRITE_DEF)/' \
-e 's/mesondefine HB_HAS_CORETEXT/$(HB_HAS_CORETEXT_DEF)/' \ -e 's/mesondefine HB_HAS_CORETEXT/$(HB_HAS_CORETEXT_DEF)/' \

View File

@ -70,6 +70,13 @@ HB_BEGIN_DECLS
*/ */
#mesondefine HB_HAS_GLIB #mesondefine HB_HAS_GLIB
/**
* HB_HAS_GOBJECT:
*
* Defined if Harfbuzz has been built with GObject support.
*/
#mesondefine HB_HAS_GOBJECT
/** /**
* HB_HAS_GRAPHITE: * HB_HAS_GRAPHITE:
* *

View File

@ -438,6 +438,10 @@ if conf.get('HAVE_GLIB', 0) == 1
hb_features.set('HB_HAS_GLIB', 1) hb_features.set('HB_HAS_GLIB', 1)
endif 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 # We set those here to not include the sources below that are of no use to
# GObject Introspection # GObject Introspection
gir_sources = hb_sources + hb_gobject_sources gir_sources = hb_sources + hb_gobject_sources