2018-05-16 23:28:53 +00:00
|
|
|
hb_base_sources = [
|
|
|
|
'hb-blob.cc',
|
|
|
|
'hb-buffer-serialize.cc',
|
|
|
|
'hb-buffer.cc',
|
2019-07-22 18:12:02 +00:00
|
|
|
'hb-draw.cc',
|
2018-05-16 23:28:53 +00:00
|
|
|
'hb-common.cc',
|
|
|
|
'hb-face.cc',
|
|
|
|
'hb-font.cc',
|
2018-11-14 22:25:41 +00:00
|
|
|
'hb-map.cc',
|
2018-11-16 16:26:06 +00:00
|
|
|
'hb-ot-cff1-table.cc',
|
|
|
|
'hb-ot-cff2-table.cc',
|
2018-11-14 22:25:41 +00:00
|
|
|
'hb-ot-name.cc',
|
2018-05-16 23:28:53 +00:00
|
|
|
'hb-ot-tag.cc',
|
|
|
|
'hb-set.cc',
|
|
|
|
'hb-shape.cc',
|
|
|
|
'hb-shape-plan.cc',
|
|
|
|
'hb-shaper.cc',
|
2018-11-14 22:25:41 +00:00
|
|
|
'hb-static.cc',
|
2018-05-16 23:28:53 +00:00
|
|
|
'hb-unicode.cc',
|
2019-07-22 18:12:02 +00:00
|
|
|
'hb-ucd.cc',
|
|
|
|
'hb-number.cc'
|
2018-05-16 23:28:53 +00:00
|
|
|
]
|
|
|
|
|
2018-11-12 19:41:39 +00:00
|
|
|
hb_base_headers = files([
|
2018-05-16 23:28:53 +00:00
|
|
|
'hb.h',
|
|
|
|
'hb-blob.h',
|
|
|
|
'hb-buffer.h',
|
2019-07-22 18:12:02 +00:00
|
|
|
'hb-draw.h',
|
2018-05-16 23:28:53 +00:00
|
|
|
'hb-common.h',
|
|
|
|
'hb-deprecated.h',
|
|
|
|
'hb-face.h',
|
|
|
|
'hb-font.h',
|
2018-11-14 22:25:41 +00:00
|
|
|
'hb-map.h',
|
2018-05-16 23:28:53 +00:00
|
|
|
'hb-set.h',
|
|
|
|
'hb-shape.h',
|
|
|
|
'hb-shape-plan.h',
|
|
|
|
'hb-unicode.h',
|
|
|
|
'hb-version.h',
|
2019-07-22 18:12:02 +00:00
|
|
|
'hb-number.hh'
|
2018-11-12 19:41:39 +00:00
|
|
|
])
|
2018-05-16 23:28:53 +00:00
|
|
|
|
|
|
|
hb_base_ragel_sources = [
|
|
|
|
'hb-buffer-deserialize-json.rl',
|
|
|
|
'hb-buffer-deserialize-text.rl',
|
|
|
|
]
|
|
|
|
|
|
|
|
hb_fallback_sources = [
|
|
|
|
'hb-fallback-shape.cc',
|
|
|
|
]
|
|
|
|
|
|
|
|
hb_ot_sources = [
|
|
|
|
'hb-aat-layout.cc',
|
2018-11-14 22:25:41 +00:00
|
|
|
'hb-aat-map.cc',
|
|
|
|
'hb-ot-face.cc',
|
2018-05-16 23:28:53 +00:00
|
|
|
'hb-ot-font.cc',
|
2019-07-22 18:12:02 +00:00
|
|
|
'hb-ot-metrics.cc',
|
2018-05-16 23:28:53 +00:00
|
|
|
'hb-ot-layout.cc',
|
|
|
|
'hb-ot-color.cc',
|
|
|
|
'hb-ot-map.cc',
|
|
|
|
'hb-ot-math.cc',
|
|
|
|
'hb-ot-shape.cc',
|
|
|
|
'hb-ot-shape-complex-arabic.cc',
|
|
|
|
'hb-ot-shape-complex-default.cc',
|
|
|
|
'hb-ot-shape-complex-hangul.cc',
|
|
|
|
'hb-ot-shape-complex-hebrew.cc',
|
|
|
|
'hb-ot-shape-complex-indic.cc',
|
|
|
|
'hb-ot-shape-complex-indic-table.cc',
|
|
|
|
'hb-ot-shape-complex-khmer.cc',
|
|
|
|
'hb-ot-shape-complex-myanmar.cc',
|
|
|
|
'hb-ot-shape-complex-thai.cc',
|
|
|
|
'hb-ot-shape-complex-use.cc',
|
|
|
|
'hb-ot-shape-complex-use-table.cc',
|
2018-11-14 22:25:41 +00:00
|
|
|
'hb-ot-shape-complex-vowel-constraints.cc',
|
2018-05-16 23:28:53 +00:00
|
|
|
'hb-ot-shape-normalize.cc',
|
|
|
|
'hb-ot-shape-fallback.cc',
|
2018-11-16 16:26:06 +00:00
|
|
|
'hb-ot-cff1-table.cc',
|
|
|
|
'hb-ot-cff2-table.cc',
|
2018-05-16 23:28:53 +00:00
|
|
|
'hb-ot-var.cc',
|
|
|
|
]
|
|
|
|
|
2018-11-12 19:41:39 +00:00
|
|
|
hb_ot_headers = files([
|
2018-05-16 23:28:53 +00:00
|
|
|
'hb-ot.h',
|
2019-07-22 18:12:02 +00:00
|
|
|
'hb-ot-deprecated.h',
|
|
|
|
'hb-ot-metrics.h',
|
2018-11-14 22:25:41 +00:00
|
|
|
'hb-ot-color.h',
|
2018-05-16 23:28:53 +00:00
|
|
|
'hb-ot-font.h',
|
|
|
|
'hb-ot-layout.h',
|
|
|
|
'hb-ot-math.h',
|
2018-11-14 22:25:41 +00:00
|
|
|
'hb-ot-name.h',
|
2018-05-16 23:28:53 +00:00
|
|
|
'hb-ot-shape.h',
|
|
|
|
'hb-ot-var.h',
|
2018-11-12 19:41:39 +00:00
|
|
|
])
|
2018-05-16 23:28:53 +00:00
|
|
|
|
|
|
|
hb_ot_ragel_sources = [
|
|
|
|
'hb-ot-shape-complex-indic-machine.rl',
|
|
|
|
'hb-ot-shape-complex-khmer-machine.rl',
|
|
|
|
'hb-ot-shape-complex-myanmar-machine.rl',
|
|
|
|
'hb-ot-shape-complex-use-machine.rl',
|
|
|
|
]
|
|
|
|
|
|
|
|
hb_ft_sources = [
|
|
|
|
'hb-ft.cc',
|
|
|
|
]
|
|
|
|
|
2018-11-12 19:41:39 +00:00
|
|
|
hb_ft_headers = files([
|
2018-05-16 23:28:53 +00:00
|
|
|
'hb-ft.h',
|
2018-11-12 19:41:39 +00:00
|
|
|
])
|
2018-05-16 23:28:53 +00:00
|
|
|
|
|
|
|
hb_glib_sources = [
|
|
|
|
'hb-glib.cc',
|
|
|
|
]
|
|
|
|
|
2018-11-12 19:41:39 +00:00
|
|
|
hb_glib_headers = files([
|
2018-05-16 23:28:53 +00:00
|
|
|
'hb-glib.h',
|
2018-11-12 19:41:39 +00:00
|
|
|
])
|
2018-05-16 23:28:53 +00:00
|
|
|
|
|
|
|
hb_graphite2_sources = [
|
|
|
|
'hb-graphite2.cc',
|
|
|
|
]
|
|
|
|
|
2018-11-12 19:41:39 +00:00
|
|
|
hb_graphite2_headers = files([
|
2018-05-16 23:28:53 +00:00
|
|
|
'hb-graphite2.h',
|
2018-11-12 19:41:39 +00:00
|
|
|
])
|
2018-05-16 23:28:53 +00:00
|
|
|
|
|
|
|
hb_icu_sources = [
|
|
|
|
'hb-icu.cc',
|
|
|
|
]
|
|
|
|
|
2018-11-12 19:41:39 +00:00
|
|
|
hb_icu_headers = files([
|
2018-05-16 23:28:53 +00:00
|
|
|
'hb-icu.h',
|
2018-11-12 19:41:39 +00:00
|
|
|
])
|
2018-05-16 23:28:53 +00:00
|
|
|
|
|
|
|
hb_subset_sources = [
|
2018-11-16 16:26:06 +00:00
|
|
|
'hb-ot-cff1-table.cc',
|
|
|
|
'hb-ot-cff2-table.cc',
|
2018-11-14 22:25:41 +00:00
|
|
|
'hb-static.cc',
|
2018-05-16 23:28:53 +00:00
|
|
|
'hb-subset.cc',
|
2018-11-16 16:26:06 +00:00
|
|
|
'hb-subset-cff1.cc',
|
|
|
|
'hb-subset-cff2.cc',
|
|
|
|
'hb-subset-cff-common.cc',
|
2018-05-16 23:28:53 +00:00
|
|
|
'hb-subset-input.cc',
|
|
|
|
'hb-subset-plan.cc',
|
2019-07-22 18:12:02 +00:00
|
|
|
'hb-number.cc',
|
|
|
|
'hb-ot-meta.cc'
|
2018-05-16 23:28:53 +00:00
|
|
|
]
|
|
|
|
|
2018-11-12 19:41:39 +00:00
|
|
|
hb_subset_headers = files([
|
2018-05-16 23:28:53 +00:00
|
|
|
'hb-subset.h',
|
2019-07-22 18:12:02 +00:00
|
|
|
'hb-number.hh',
|
|
|
|
'hb-ot-meta.h'
|
2018-11-12 19:41:39 +00:00
|
|
|
])
|
2018-05-16 23:28:53 +00:00
|
|
|
|
|
|
|
hb_gobject_sources = [
|
|
|
|
'hb-gobject-structs.cc'
|
|
|
|
]
|
|
|
|
|
2018-11-12 19:41:39 +00:00
|
|
|
hb_gobject_headers = files([
|
2018-05-16 23:28:53 +00:00
|
|
|
'hb-gobject.h',
|
|
|
|
'hb-gobject-structs.h',
|
2018-11-12 19:41:39 +00:00
|
|
|
])
|
2018-05-16 23:28:53 +00:00
|
|
|
|
2018-11-12 15:58:09 +00:00
|
|
|
incucdn = []
|
2018-05-16 23:28:53 +00:00
|
|
|
incsrc = include_directories('.')
|
|
|
|
|
2018-11-12 15:58:09 +00:00
|
|
|
hb_sources = hb_base_sources + hb_fallback_sources + hb_ot_sources
|
2018-06-05 00:15:43 +00:00
|
|
|
hb_headers = hb_base_headers + hb_ot_headers
|
2018-05-16 23:28:53 +00:00
|
|
|
|
|
|
|
if conf.get('HAVE_FREETYPE', 0) == 1
|
|
|
|
hb_sources += hb_ft_sources
|
|
|
|
hb_headers += hb_ft_headers
|
|
|
|
endif
|
|
|
|
|
|
|
|
if conf.get('HAVE_GRAPHITE2', 0) == 1
|
|
|
|
hb_sources += hb_graphite2_sources
|
|
|
|
hb_headers += hb_graphite2_headers
|
|
|
|
endif
|
|
|
|
|
|
|
|
if conf.get('HAVE_GLIB', 0) == 1
|
|
|
|
hb_sources += hb_glib_sources
|
|
|
|
hb_headers += hb_glib_headers
|
|
|
|
endif
|
|
|
|
|
|
|
|
if conf.get('HAVE_ICU', 0) == 1
|
|
|
|
hb_sources += hb_icu_sources
|
|
|
|
hb_headers += hb_icu_headers
|
|
|
|
endif
|
|
|
|
|
2018-11-12 16:56:56 +00:00
|
|
|
if conf.get('HAVE_UNISCRIBE', 0) == 1
|
|
|
|
hb_sources += ['hb-uniscribe.cc']
|
|
|
|
hb_headers += ['hb-uniscribe.h']
|
|
|
|
endif
|
|
|
|
|
2018-11-12 16:56:56 +00:00
|
|
|
if conf.get('HAVE_DIRECTWRITE', 0) == 1
|
|
|
|
hb_sources += ['hb-directwrite.cc']
|
|
|
|
hb_headers += ['hb-directwrite.h']
|
|
|
|
endif
|
|
|
|
|
2018-11-12 16:56:56 +00:00
|
|
|
if conf.get('HAVE_CORETEXT', 0) == 1
|
|
|
|
hb_sources += ['hb-coretext.cc']
|
|
|
|
hb_headers += ['hb-coretext.h']
|
|
|
|
endif
|
|
|
|
|
2020-03-11 17:21:40 +00:00
|
|
|
if get_option('amalgam')
|
|
|
|
# replace the array if is amalgam build
|
|
|
|
hb_sources = ['harfbuzz.cc']
|
|
|
|
endif
|
|
|
|
|
2018-11-12 19:41:39 +00:00
|
|
|
# harfbuzz
|
|
|
|
gen_def = find_program('gen-def.py')
|
|
|
|
harfbuzz_def = custom_target('harfbuzz.def',
|
|
|
|
command: [gen_def, '@OUTPUT@', '@INPUT@'],
|
|
|
|
input: hb_headers,
|
|
|
|
output: 'harfbuzz.def')
|
|
|
|
|
2018-06-05 00:15:43 +00:00
|
|
|
version = '0.' + '0'.join(meson.project_version().split('.')) + '.0'
|
|
|
|
|
2018-05-16 23:28:53 +00:00
|
|
|
libharfbuzz = library('harfbuzz', hb_sources,
|
2018-11-14 20:19:36 +00:00
|
|
|
include_directories: [incconfig, incucdn],
|
2018-05-16 23:28:53 +00:00
|
|
|
dependencies: deps,
|
|
|
|
cpp_args: cpp_args,
|
2018-11-12 19:41:39 +00:00
|
|
|
vs_module_defs: harfbuzz_def,
|
2018-05-17 21:53:20 +00:00
|
|
|
soversion: '0',
|
2018-06-05 00:15:43 +00:00
|
|
|
version: version,
|
|
|
|
install: true,
|
2018-05-17 21:53:20 +00:00
|
|
|
name_prefix: 'lib')
|
2018-05-16 23:28:53 +00:00
|
|
|
|
2018-10-12 14:11:49 +00:00
|
|
|
libharfbuzz_dep = declare_dependency(
|
|
|
|
link_with: libharfbuzz,
|
2018-11-14 19:05:47 +00:00
|
|
|
include_directories: [incsrc, incucdn],
|
2018-10-12 14:11:49 +00:00
|
|
|
dependencies: deps)
|
|
|
|
|
2018-11-12 19:41:39 +00:00
|
|
|
# harfbuzz-subset
|
|
|
|
harfbuzz_subset_def = custom_target('harfbuzz-subset.def',
|
|
|
|
command: [gen_def, '@OUTPUT@', '@INPUT@'],
|
|
|
|
input: hb_subset_headers,
|
|
|
|
output: 'harfbuzz-subset.def')
|
|
|
|
|
2018-05-16 23:28:53 +00:00
|
|
|
libharfbuzz_subset = library('harfbuzz-subset', hb_subset_sources,
|
2018-11-14 20:19:36 +00:00
|
|
|
include_directories: incconfig,
|
2018-05-16 23:28:53 +00:00
|
|
|
link_with: [libharfbuzz],
|
2018-05-17 21:53:20 +00:00
|
|
|
cpp_args: cpp_args,
|
2018-11-12 19:41:39 +00:00
|
|
|
vs_module_defs: harfbuzz_subset_def,
|
2018-05-17 21:53:20 +00:00
|
|
|
soversion: '0',
|
2018-06-05 00:15:43 +00:00
|
|
|
version: version,
|
|
|
|
install: true,
|
2018-05-17 21:53:20 +00:00
|
|
|
name_prefix: 'lib')
|
2018-05-16 23:28:53 +00:00
|
|
|
|
2018-10-12 14:11:49 +00:00
|
|
|
libharfbuzz_subset_dep = declare_dependency(
|
|
|
|
link_with: libharfbuzz_subset,
|
2018-11-14 19:05:47 +00:00
|
|
|
include_directories: incsrc,
|
2018-10-12 14:11:49 +00:00
|
|
|
dependencies: deps)
|
|
|
|
|
2018-06-05 00:15:43 +00:00
|
|
|
pkgmod.generate(libharfbuzz,
|
|
|
|
description: 'HarfBuzz text shaping library',
|
2018-06-05 16:19:29 +00:00
|
|
|
subdirs: [meson.project_name()],
|
2018-06-05 00:15:43 +00:00
|
|
|
version: meson.project_version(),
|
|
|
|
)
|
|
|
|
|
|
|
|
pkgmod.generate(libharfbuzz_subset,
|
|
|
|
description: 'HarfBuzz font subsetter',
|
2018-06-05 16:19:29 +00:00
|
|
|
subdirs: [meson.project_name()],
|
2018-06-05 00:15:43 +00:00
|
|
|
version: meson.project_version(),
|
|
|
|
)
|
|
|
|
|
2018-12-03 19:51:06 +00:00
|
|
|
have_gobject = conf.get('HAVE_GOBJECT', 0) == 1
|
|
|
|
|
|
|
|
cmake_config = configuration_data()
|
|
|
|
cmake_config.set('libdir', '${prefix}/@0@'.format(get_option('libdir')))
|
|
|
|
cmake_config.set('includedir', '${prefix}/@0@'.format(get_option('includedir')))
|
|
|
|
cmake_config.set('HB_LIBTOOL_VERSION_INFO', hb_libtool_version_info)
|
|
|
|
cmake_config.set('have_gobject', have_gobject ? 'true' : 'false')
|
|
|
|
configure_file(input: 'harfbuzz-config.cmake.in',
|
|
|
|
output: 'harfbuzz-config.cmake',
|
|
|
|
configuration: cmake_config,
|
|
|
|
install_dir: join_paths(get_option('libdir'), 'cmake', 'harfbuzz'))
|
|
|
|
|
|
|
|
if have_gobject
|
2018-05-16 23:28:53 +00:00
|
|
|
gnome = import('gnome')
|
|
|
|
|
|
|
|
h_templ = configure_file(
|
|
|
|
input: 'hb-gobject-enums.h.tmpl',
|
|
|
|
output: 'hb-gobject-enums-tmp.h.tmpl',
|
|
|
|
configuration: configuration_data(),
|
|
|
|
format: 'cmake')
|
|
|
|
|
|
|
|
cc_templ = configure_file(
|
|
|
|
input: 'hb-gobject-enums.cc.tmpl',
|
|
|
|
output: 'hb-gobject-enums-tmp.cc.tmpl',
|
|
|
|
configuration: configuration_data(),
|
|
|
|
format: 'cmake')
|
|
|
|
|
|
|
|
enums = gnome.mkenums('hb-gobject',
|
|
|
|
sources: hb_headers,
|
|
|
|
h_template: h_templ,
|
|
|
|
c_template: cc_templ,
|
|
|
|
identifier_prefix: 'hb_',
|
|
|
|
symbol_prefix: 'hb_gobject',
|
|
|
|
)
|
|
|
|
|
|
|
|
enum_c = custom_target('hb-gobject-enums.cc',
|
|
|
|
input: enums[0],
|
|
|
|
output: 'hb-gobject-enums.cc',
|
|
|
|
command: [python3, files('fix_get_types.py')[0], '@INPUT@', '@OUTPUT@']
|
|
|
|
)
|
|
|
|
|
|
|
|
enum_h = custom_target('hb-gobject-enums.h',
|
|
|
|
input: enums[1],
|
|
|
|
output: 'hb-gobject-enums.h',
|
2018-06-05 00:15:43 +00:00
|
|
|
command: [python3, files('fix_get_types.py')[0], '@INPUT@', '@OUTPUT@'],
|
|
|
|
install: true,
|
|
|
|
install_dir: join_paths(get_option('prefix'), get_option('includedir'), meson.project_name()),
|
2018-05-16 23:28:53 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
hb_gobject_sources += [enum_c]
|
|
|
|
|
2018-11-12 19:41:39 +00:00
|
|
|
harfbuzz_gobject_def = custom_target('harfbuzz-gobject.def',
|
|
|
|
command: [gen_def, '@OUTPUT@', '@INPUT@'],
|
|
|
|
input: [hb_gobject_headers, enum_h],
|
|
|
|
output: 'harfbuzz-gobject.def')
|
|
|
|
|
2018-05-16 23:28:53 +00:00
|
|
|
libharfbuzz_gobject = library('harfbuzz-gobject', [hb_gobject_sources, enum_c, enum_h],
|
2018-11-14 20:19:36 +00:00
|
|
|
include_directories: incconfig,
|
2018-05-16 23:28:53 +00:00
|
|
|
dependencies: deps,
|
|
|
|
link_with: [libharfbuzz],
|
2018-05-17 21:53:20 +00:00
|
|
|
cpp_args: cpp_args,
|
2018-11-12 19:41:39 +00:00
|
|
|
vs_module_defs: harfbuzz_gobject_def,
|
2018-05-17 21:53:20 +00:00
|
|
|
soversion: '0',
|
2018-06-05 00:15:43 +00:00
|
|
|
version: version,
|
|
|
|
install: true,
|
2018-05-17 21:53:20 +00:00
|
|
|
name_prefix: 'lib')
|
2018-06-05 00:15:43 +00:00
|
|
|
|
2018-11-14 13:49:03 +00:00
|
|
|
gir = find_program('g-ir-scanner', required: get_option('introspection'))
|
|
|
|
build_gir = gir.found() and not meson.is_cross_build()
|
|
|
|
|
|
|
|
if build_gir
|
|
|
|
hb_gen_files_gir = gnome.generate_gir(libharfbuzz, libharfbuzz_gobject,
|
|
|
|
sources: [hb_headers, hb_sources, hb_gobject_headers, hb_gobject_sources, enum_h],
|
|
|
|
namespace: 'HarfBuzz',
|
|
|
|
nsversion: '0.0',
|
|
|
|
identifier_prefix: 'hb_',
|
|
|
|
symbol_prefix: 'hb_',
|
|
|
|
includes: ['GObject-2.0'],
|
|
|
|
install: true,
|
|
|
|
extra_args: ['--cflags-begin',
|
|
|
|
'-DHB_H',
|
|
|
|
'-DHB_H_IN',
|
|
|
|
'-DHB_OT_H',
|
|
|
|
'-DHB_OT_H_IN',
|
|
|
|
'-DHB_GOBJECT_H',
|
|
|
|
'-DHB_GOBJECT_H_IN',
|
|
|
|
'-DHB_EXTERN=',
|
|
|
|
'--cflags-end'])
|
|
|
|
endif
|
|
|
|
|
2018-10-12 14:11:49 +00:00
|
|
|
libharfbuzz_gobject_dep = declare_dependency(
|
|
|
|
link_with: libharfbuzz_gobject,
|
2018-11-14 19:05:47 +00:00
|
|
|
include_directories: incsrc,
|
2018-11-14 13:49:03 +00:00
|
|
|
sources: hb_gen_files_gir,
|
2018-10-12 14:11:49 +00:00
|
|
|
dependencies: deps)
|
|
|
|
|
2018-06-05 00:15:43 +00:00
|
|
|
pkgmod.generate(libharfbuzz_gobject,
|
|
|
|
description: 'HarfBuzz text shaping library GObject integration',
|
2018-06-05 16:19:29 +00:00
|
|
|
subdirs: [meson.project_name()],
|
2018-06-05 00:15:43 +00:00
|
|
|
version: meson.project_version(),
|
|
|
|
)
|
2018-10-12 14:11:49 +00:00
|
|
|
else
|
|
|
|
libharfbuzz_gobject_dep = dependency('', required: false)
|
2018-05-16 23:28:53 +00:00
|
|
|
endif
|
2018-06-05 00:15:43 +00:00
|
|
|
|
|
|
|
install_headers(hb_headers + hb_gobject_headers + hb_subset_headers, subdir: meson.project_name())
|