summaryrefslogtreecommitdiff
path: root/Build/source/libs/harfbuzz/harfbuzz-src/src/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/harfbuzz/harfbuzz-src/src/meson.build')
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/meson.build156
1 files changed, 124 insertions, 32 deletions
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/meson.build b/Build/source/libs/harfbuzz/harfbuzz-src/src/meson.build
index 5d01d9862c7..7e10de8d871 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/meson.build
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/meson.build
@@ -44,13 +44,19 @@ hb_base_sources = files(
'hb-dispatch.hh',
'hb-draw.cc',
'hb-draw.hh',
+ 'hb-paint.cc',
+ 'hb-paint.hh',
+ 'hb-paint-extents.cc',
+ 'hb-paint-extents.hh',
'hb-face.cc',
'hb-face.hh',
+ 'hb-face-builder.cc',
'hb-fallback-shape.cc',
'hb-font.cc',
'hb-font.hh',
'hb-iter.hh',
'hb-kern.hh',
+ 'hb-limits.hh',
'hb-machinery.hh',
'hb-map.cc',
'hb-map.hh',
@@ -71,11 +77,6 @@ hb_base_sources = files(
'hb-ot-cff2-table.cc',
'hb-ot-cff2-table.hh',
'hb-ot-cmap-table.hh',
- 'hb-ot-color-cbdt-table.hh',
- 'hb-ot-color-colr-table.hh',
- 'hb-ot-color-cpal-table.hh',
- 'hb-ot-color-sbix-table.hh',
- 'hb-ot-color-svg-table.hh',
'hb-ot-color.cc',
'hb-ot-face-table-list.hh',
'hb-ot-face.cc',
@@ -93,6 +94,13 @@ hb_base_sources = files(
'hb-ot-layout-gdef-table.hh',
'hb-ot-layout-gpos-table.hh',
'hb-ot-layout-gsub-table.hh',
+ 'hb-outline.hh',
+ 'hb-outline.cc',
+ 'OT/Color/CBDT/CBDT.hh',
+ 'OT/Color/COLR/COLR.hh',
+ 'OT/Color/CPAL/CPAL.hh',
+ 'OT/Color/sbix/sbix.hh',
+ 'OT/Color/svg/svg.hh',
'OT/glyf/glyf.hh',
'OT/glyf/glyf-helpers.hh',
'OT/glyf/loca.hh',
@@ -107,6 +115,7 @@ hb_base_sources = files(
'OT/Layout/Common/CoverageFormat1.hh',
'OT/Layout/Common/CoverageFormat2.hh',
'OT/Layout/Common/RangeRecord.hh',
+ 'OT/Layout/GDEF/GDEF.hh',
'OT/Layout/GPOS/AnchorFormat1.hh',
'OT/Layout/GPOS/AnchorFormat2.hh',
'OT/Layout/GPOS/AnchorFormat3.hh',
@@ -161,6 +170,7 @@ hb_base_sources = files(
'OT/Layout/GSUB/SingleSubst.hh',
'OT/Layout/GSUB/SubstLookup.hh',
'OT/Layout/GSUB/SubstLookupSubTable.hh',
+ 'OT/name/name.hh',
'hb-ot-layout-gsubgpos.hh',
'hb-ot-layout-jstf-table.hh',
'hb-ot-layout.cc',
@@ -250,7 +260,8 @@ hb_base_sources = files(
hb_base_ragel_generated_sources = files(
'hb-buffer-deserialize-json.hh',
- 'hb-buffer-deserialize-text.hh',
+ 'hb-buffer-deserialize-text-glyphs.hh',
+ 'hb-buffer-deserialize-text-unicode.hh',
'hb-number-parser.hh',
'hb-ot-shaper-indic-machine.hh',
'hb-ot-shaper-khmer-machine.hh',
@@ -259,7 +270,8 @@ hb_base_ragel_generated_sources = files(
)
hb_base_ragel_sources = [
'hb-buffer-deserialize-json.rl',
- 'hb-buffer-deserialize-text.rl',
+ 'hb-buffer-deserialize-text-glyphs.rl',
+ 'hb-buffer-deserialize-text-unicode.rl',
'hb-number-parser.rl',
'hb-ot-shaper-indic-machine.rl',
'hb-ot-shaper-khmer-machine.rl',
@@ -276,6 +288,7 @@ hb_base_headers = files(
'hb-cplusplus.hh',
'hb-deprecated.h',
'hb-draw.h',
+ 'hb-paint.h',
'hb-face.h',
'hb-font.h',
'hb-map.h',
@@ -301,7 +314,7 @@ hb_base_headers += hb_version_h
# Optional Sources and Headers with external deps
-hb_ft_sources = files('hb-ft.cc')
+hb_ft_sources = files('hb-ft.cc', 'hb-ft-colr.hh')
hb_ft_headers = files('hb-ft.h')
hb_glib_sources = files('hb-glib.cc')
@@ -344,6 +357,7 @@ hb_subset_sources = files(
'hb-subset-cff2.hh',
'hb-subset-input.cc',
'hb-subset-input.hh',
+ 'hb-subset-instancer-solver.cc',
'hb-subset-plan.cc',
'hb-subset-plan.hh',
'hb-subset-repacker.cc',
@@ -415,40 +429,38 @@ harfbuzz_deps = [thread_dep, m_dep] + harfbuzz_extra_deps
libharfbuzz_link_language = 'c'
-hb_features = configuration_data()
-
if conf.get('HAVE_FREETYPE', 0) == 1
hb_sources += hb_ft_sources
hb_headers += hb_ft_headers
harfbuzz_deps += [freetype_dep]
- hb_features.set('HB_HAS_FREETYPE', 1)
endif
+if conf.get('HAVE_GLIB', 0) == 1
+ hb_sources += hb_glib_sources
+ hb_headers += hb_glib_headers
+ harfbuzz_deps += [glib_dep]
+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
+gir_headers = hb_headers + hb_gobject_headers
+
if conf.get('HAVE_GDI', 0) == 1
hb_sources += hb_gdi_sources
hb_headers += hb_gdi_headers
harfbuzz_deps += gdi_uniscribe_deps
- hb_features.set('HB_HAS_GDI', 1)
endif
if conf.get('HAVE_GRAPHITE2', 0) == 1
hb_sources += hb_graphite2_sources
hb_headers += hb_graphite2_headers
harfbuzz_deps += [graphite2_dep, graphite_dep]
- hb_features.set('HB_HAS_GRAPHITE', 1)
-endif
-
-if conf.get('HAVE_GLIB', 0) == 1
- hb_sources += hb_glib_sources
- hb_headers += hb_glib_headers
- harfbuzz_deps += [glib_dep]
- hb_features.set('HB_HAS_GLIB', 1)
endif
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
if conf.get('HAVE_DIRECTWRITE', 0) == 1
@@ -456,32 +468,58 @@ if conf.get('HAVE_DIRECTWRITE', 0) == 1
hb_headers += hb_directwrite_headers
# hb-directwrite needs a C++ linker
libharfbuzz_link_language = 'cpp'
- hb_features.set('HB_HAS_DIRECTWRITE', 1)
endif
if conf.get('HAVE_CORETEXT', 0) == 1
hb_sources += hb_coretext_sources
hb_headers += hb_coretext_headers
harfbuzz_deps += coretext_deps
- hb_features.set('HB_HAS_CORETEXT', 1)
endif
have_icu = conf.get('HAVE_ICU', 0) == 1
have_icu_builtin = conf.get('HAVE_ICU_BUILTIN', 0) == 1
-
if have_icu and have_icu_builtin
hb_sources += hb_icu_sources
hb_headers += hb_icu_headers
harfbuzz_deps += [icu_dep]
- hb_features.set('HB_HAS_ICU', 1)
endif
+features = [
+ 'CAIRO',
+ 'CORETEXT',
+ 'DIRECTWRITE',
+ 'FREETYPE',
+ 'GDI',
+ 'GLIB',
+ 'GOBJECT',
+ 'GRAPHITE',
+ 'ICU',
+ 'UNISCRIBE',
+]
+
+hb_enabled_features = configuration_data()
+hb_supported_features = configuration_data()
+foreach feature : features
+ key = 'HB_HAS_@0@'.format(feature)
+ hb_enabled_features.set(key, conf.get('HAVE_@0@'.format(feature), false))
+ hb_supported_features.set(key, 1)
+endforeach
+
+# The enabled features. This file is installed.
hb_features_h = configure_file(input: 'hb-features.h.in',
output: 'hb-features.h',
- configuration: hb_features,
+ configuration: hb_enabled_features,
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
@@ -535,6 +573,7 @@ libharfbuzz_dep = declare_dependency(
link_with: libharfbuzz,
include_directories: incsrc,
dependencies: harfbuzz_deps)
+meson.override_dependency('harfbuzz', libharfbuzz_dep)
# harfbuzz-subset
harfbuzz_subset_def = custom_target('harfbuzz-subset.def',
@@ -567,6 +606,55 @@ libharfbuzz_subset_dep = declare_dependency(
link_with: libharfbuzz_subset,
include_directories: incsrc,
dependencies: [m_dep])
+meson.override_dependency('harfbuzz-subset', libharfbuzz_subset_dep)
+
+libharfbuzz_cairo_dep = null_dep
+if conf.get('HAVE_CAIRO', 0) == 1
+ hb_cairo_sources = [
+ 'hb-cairo.cc',
+ 'hb-cairo-utils.cc',
+ 'hb-static.cc'
+ ]
+
+ hb_cairo_headers = [
+ 'hb-cairo.h',
+ ]
+
+ cairo_dep = dependency('cairo')
+
+ libharfbuzz_cairo = library('harfbuzz-cairo', hb_cairo_sources,
+ include_directories: incconfig,
+ dependencies: [m_dep, cairo_dep],
+ link_with: [libharfbuzz],
+ cpp_args: cpp_args + extra_hb_cpp_args,
+ soversion: hb_so_version,
+ version: version,
+ install: true,
+ darwin_versions: darwin_versions,
+ link_language: 'c',
+ )
+
+ install_headers(hb_cairo_headers, subdir: meson.project_name())
+
+ libharfbuzz_cairo_dep = declare_dependency(
+ link_with: libharfbuzz_cairo,
+ include_directories: incsrc,
+ dependencies: [m_dep, cairo_dep])
+ meson.override_dependency('harfbuzz-cairo', libharfbuzz_cairo_dep)
+
+ harfbuzz_cairo_def = custom_target('harfbuzz-cairo.def',
+ command: [gen_def, '@OUTPUT@', '@INPUT@'],
+ input: hb_cairo_headers,
+ output: 'harfbuzz-cairo.def')
+ defs_list += [harfbuzz_cairo_def]
+
+ pkgmod.generate(libharfbuzz_cairo,
+ description: 'HarfBuzz cairo support',
+ requires: ['harfbuzz = @0@'.format(meson.project_version())],
+ subdirs: [meson.project_name()],
+ version: meson.project_version(),
+ )
+endif
if get_option('tests').enabled()
# TODO: MSVC gives the following,
@@ -663,6 +751,7 @@ if have_icu and not have_icu_builtin
link_with: libharfbuzz_icu,
include_directories: incsrc,
dependencies: icu_dep)
+ meson.override_dependency('harfbuzz-icu', libharfbuzz_icu_dep)
pkgmod.generate(libharfbuzz_icu,
description: 'HarfBuzz text shaping library ICU integration',
@@ -687,6 +776,8 @@ configure_file(input: 'harfbuzz-config.cmake.in',
install_dir: get_option('libdir') / 'cmake' / 'harfbuzz',
)
+gobject_enums_c = []
+gobject_enums_h = []
libharfbuzz_gobject_dep = null_dep
if have_gobject
gnome = import('gnome')
@@ -709,13 +800,13 @@ if have_gobject
symbol_prefix: 'hb_gobject',
)
- enum_c = custom_target('hb-gobject-enums.cc',
+ gobject_enums_c = custom_target('hb-gobject-enums.cc',
input: enums[0],
output: 'hb-gobject-enums.cc',
command: [find_program('fix_get_types.py'), '@INPUT@', '@OUTPUT@']
)
- enum_h = custom_target('hb-gobject-enums.h',
+ gobject_enums_h = custom_target('hb-gobject-enums.h',
input: enums[1],
output: 'hb-gobject-enums.h',
command: [find_program('fix_get_types.py'), '@INPUT@', '@OUTPUT@'],
@@ -723,15 +814,15 @@ if have_gobject
install_dir: get_option('prefix') / get_option('includedir') / meson.project_name(),
)
- hb_gobject_sources += [enum_c]
+ hb_gobject_sources += [gobject_enums_c]
harfbuzz_gobject_def = custom_target('harfbuzz-gobject.def',
command: [gen_def, '@OUTPUT@', '@INPUT@'],
- input: [hb_gobject_headers, enum_h],
+ input: [hb_gobject_headers, gobject_enums_h],
output: 'harfbuzz-gobject.def')
defs_list += [harfbuzz_gobject_def]
- libharfbuzz_gobject = library('harfbuzz-gobject', [hb_gobject_sources, enum_c, enum_h],
+ libharfbuzz_gobject = library('harfbuzz-gobject', [hb_gobject_sources, gobject_enums_c, gobject_enums_h],
include_directories: incconfig,
dependencies: [glib_dep, gobject_dep],
link_with: [libharfbuzz],
@@ -754,7 +845,7 @@ if have_gobject
if build_gir
conf.set('HAVE_INTROSPECTION', 1)
hb_gen_files_gir = gnome.generate_gir(libharfbuzz_gobject,
- sources: [hb_headers, hb_sources, hb_gobject_headers, hb_gobject_sources, enum_h],
+ sources: [gir_headers, gir_sources, gobject_enums_h],
dependencies: libharfbuzz_dep,
namespace: 'HarfBuzz',
nsversion: '0.0',
@@ -776,6 +867,7 @@ if have_gobject
include_directories: incsrc,
sources: build_gir ? hb_gen_files_gir : hb_gobject_sources,
dependencies: [glib_dep, gobject_dep])
+ meson.override_dependency('harfbuzz-gobject', libharfbuzz_gobject_dep)
pkgmod.generate(libharfbuzz_gobject,
description: 'HarfBuzz text shaping library GObject integration',