[doc] Generate hb-supported-features.h

See inline comment.
This commit is contained in:
Khaled Hosny 2023-01-23 23:41:11 +02:00
parent 0bbd3360ee
commit 12f2ecbddb
2 changed files with 20 additions and 0 deletions

View File

@ -36,6 +36,7 @@ html_images = [
]
ignore_headers = [
'hb-features.h',
'hb-gobject.h',
'hb-gobject-enums.h',
'hb-gobject-enums-tmp.h',

View File

@ -423,6 +423,7 @@ harfbuzz_deps = [thread_dep, m_dep] + harfbuzz_extra_deps
libharfbuzz_link_language = 'c'
hb_features = configuration_data()
hb_supported_features = configuration_data()
if conf.get('HAVE_FREETYPE', 0) == 1
hb_sources += hb_ft_sources
@ -430,6 +431,7 @@ if conf.get('HAVE_FREETYPE', 0) == 1
harfbuzz_deps += [freetype_dep]
hb_features.set('HB_HAS_FREETYPE', 1)
endif
hb_supported_features.set('HB_HAS_FREETYPE', 1)
if conf.get('HAVE_GLIB', 0) == 1
hb_sources += hb_glib_sources
@ -437,10 +439,12 @@ if conf.get('HAVE_GLIB', 0) == 1
harfbuzz_deps += [glib_dep]
hb_features.set('HB_HAS_GLIB', 1)
endif
hb_supported_features.set('HB_HAS_GLIB', 1)
if conf.get('HAVE_GOBJECT', 0) == 1
hb_features.set('HB_HAS_GOBJECT', 1)
endif
hb_supported_features.set('HB_HAS_GOBJECT', 1)
# We set those here to not include the sources below that are of no use to
# GObject Introspection
@ -453,6 +457,7 @@ if conf.get('HAVE_GDI', 0) == 1
harfbuzz_deps += gdi_uniscribe_deps
hb_features.set('HB_HAS_GDI', 1)
endif
hb_supported_features.set('HB_HAS_GDI', 1)
if conf.get('HAVE_GRAPHITE2', 0) == 1
hb_sources += hb_graphite2_sources
@ -460,12 +465,14 @@ if conf.get('HAVE_GRAPHITE2', 0) == 1
harfbuzz_deps += [graphite2_dep, graphite_dep]
hb_features.set('HB_HAS_GRAPHITE', 1)
endif
hb_supported_features.set('HB_HAS_GRAPHITE', 1)
if conf.get('HAVE_UNISCRIBE', 0) == 1
hb_sources += hb_uniscribe_sources
hb_headers += hb_uniscribe_headers
hb_features.set('HB_HAS_UNISCRIBE', 1)
endif
hb_supported_features.set('HB_HAS_UNISCRIBE', 1)
if conf.get('HAVE_DIRECTWRITE', 0) == 1
hb_sources += hb_directwrite_sources
@ -474,6 +481,7 @@ if conf.get('HAVE_DIRECTWRITE', 0) == 1
libharfbuzz_link_language = 'cpp'
hb_features.set('HB_HAS_DIRECTWRITE', 1)
endif
hb_supported_features.set('HB_HAS_DIRECTWRITE', 1)
if conf.get('HAVE_CORETEXT', 0) == 1
hb_sources += hb_coretext_sources
@ -481,6 +489,7 @@ if conf.get('HAVE_CORETEXT', 0) == 1
harfbuzz_deps += coretext_deps
hb_features.set('HB_HAS_CORETEXT', 1)
endif
hb_supported_features.set('HB_HAS_CORETEXT', 1)
have_icu = conf.get('HAVE_ICU', 0) == 1
have_icu_builtin = conf.get('HAVE_ICU_BUILTIN', 0) == 1
@ -491,10 +500,12 @@ if have_icu and have_icu_builtin
harfbuzz_deps += [icu_dep]
hb_features.set('HB_HAS_ICU', 1)
endif
hb_supported_features.set('HB_HAS_ICU', 1)
if conf.get('HAVE_CAIRO', 0) == 1
hb_features.set('HB_HAS_CAIRO', 1)
endif
hb_supported_features.set('HB_HAS_CAIRO', 1)
hb_features_h = configure_file(input: 'hb-features.h.in',
output: 'hb-features.h',
@ -502,6 +513,14 @@ hb_features_h = configure_file(input: 'hb-features.h.in',
install: true,
install_dir: get_option('includedir') / meson.project_name())
# This file is generated to convince gtk-doc to generate documentation for all
# HB_HAS_* macros, whether they are enabled for the current build or not.
# This file should not be installed.
hb_supported_features_h = configure_file(input: 'hb-features.h.in',
output: 'hb-supported-features.h',
configuration: hb_supported_features,
install: false)
# Base and default-included sources and headers
# harfbuzz