2020-03-24 11:34:33 +00:00
|
|
|
# Base and default-included sources and headers
|
2018-05-16 23:28:53 +00:00
|
|
|
hb_base_sources = [
|
2020-03-24 11:34:33 +00:00
|
|
|
'hb-aat-fdsc-table.hh',
|
|
|
|
'hb-aat-layout-ankr-table.hh',
|
|
|
|
'hb-aat-layout-bsln-table.hh',
|
|
|
|
'hb-aat-layout-common.hh',
|
|
|
|
'hb-aat-layout-feat-table.hh',
|
|
|
|
'hb-aat-layout-just-table.hh',
|
|
|
|
'hb-aat-layout-kerx-table.hh',
|
|
|
|
'hb-aat-layout-lcar-table.hh',
|
|
|
|
'hb-aat-layout-morx-table.hh',
|
|
|
|
'hb-aat-layout-opbd-table.hh',
|
|
|
|
'hb-aat-layout-trak-table.hh',
|
|
|
|
'hb-aat-layout.cc',
|
|
|
|
'hb-aat-layout.hh',
|
|
|
|
'hb-aat-ltag-table.hh',
|
|
|
|
'hb-aat-map.cc',
|
|
|
|
'hb-aat-map.hh',
|
|
|
|
'hb-algs.hh',
|
|
|
|
'hb-array.hh',
|
|
|
|
'hb-atomic.hh',
|
2018-05-16 23:28:53 +00:00
|
|
|
'hb-blob.cc',
|
2020-03-24 11:34:33 +00:00
|
|
|
'hb-blob.hh',
|
2018-05-16 23:28:53 +00:00
|
|
|
'hb-buffer-serialize.cc',
|
|
|
|
'hb-buffer.cc',
|
2020-03-24 11:34:33 +00:00
|
|
|
'hb-buffer.hh',
|
|
|
|
'hb-cache.hh',
|
|
|
|
'hb-cff-interp-common.hh',
|
|
|
|
'hb-cff-interp-cs-common.hh',
|
|
|
|
'hb-cff-interp-dict-common.hh',
|
|
|
|
'hb-cff1-interp-cs.hh',
|
|
|
|
'hb-cff2-interp-cs.hh',
|
2018-05-16 23:28:53 +00:00
|
|
|
'hb-common.cc',
|
2020-03-24 11:34:33 +00:00
|
|
|
'hb-config.hh',
|
|
|
|
'hb-debug.hh',
|
|
|
|
'hb-dispatch.hh',
|
|
|
|
'hb-draw.cc',
|
|
|
|
'hb-draw.hh',
|
2018-05-16 23:28:53 +00:00
|
|
|
'hb-face.cc',
|
2020-03-24 11:34:33 +00:00
|
|
|
'hb-face.hh',
|
|
|
|
'hb-fallback-shape.cc',
|
2018-05-16 23:28:53 +00:00
|
|
|
'hb-font.cc',
|
2020-03-24 11:34:33 +00:00
|
|
|
'hb-font.hh',
|
|
|
|
'hb-iter.hh',
|
|
|
|
'hb-kern.hh',
|
|
|
|
'hb-machinery.hh',
|
2018-11-14 22:25:41 +00:00
|
|
|
'hb-map.cc',
|
2020-03-24 11:34:33 +00:00
|
|
|
'hb-map.hh',
|
|
|
|
'hb-bimap.hh',
|
|
|
|
'hb-meta.hh',
|
|
|
|
'hb-mutex.hh',
|
|
|
|
'hb-null.hh',
|
|
|
|
'hb-number.cc',
|
|
|
|
'hb-number.hh',
|
|
|
|
'hb-object.hh',
|
|
|
|
'hb-open-file.hh',
|
|
|
|
'hb-open-type.hh',
|
|
|
|
'hb-ot-cff-common.hh',
|
2018-11-16 16:26:06 +00:00
|
|
|
'hb-ot-cff1-table.cc',
|
2020-03-24 11:34:33 +00:00
|
|
|
'hb-ot-cff1-table.hh',
|
|
|
|
'hb-ot-cff1-std-str.hh',
|
2018-11-16 16:26:06 +00:00
|
|
|
'hb-ot-cff2-table.cc',
|
2020-03-24 11:34:33 +00:00
|
|
|
'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',
|
2018-11-14 22:25:41 +00:00
|
|
|
'hb-ot-face.cc',
|
2020-03-24 11:34:33 +00:00
|
|
|
'hb-ot-face.hh',
|
|
|
|
'hb-ot-face-table-list.hh',
|
2018-05-16 23:28:53 +00:00
|
|
|
'hb-ot-font.cc',
|
2020-03-24 11:34:33 +00:00
|
|
|
'hb-ot-gasp-table.hh',
|
|
|
|
'hb-ot-glyf-table.hh',
|
|
|
|
'hb-ot-hdmx-table.hh',
|
|
|
|
'hb-ot-head-table.hh',
|
|
|
|
'hb-ot-hhea-table.hh',
|
|
|
|
'hb-ot-hmtx-table.hh',
|
|
|
|
'hb-ot-kern-table.hh',
|
|
|
|
'hb-ot-layout-base-table.hh',
|
|
|
|
'hb-ot-layout-common.hh',
|
|
|
|
'hb-ot-layout-gdef-table.hh',
|
|
|
|
'hb-ot-layout-gpos-table.hh',
|
|
|
|
'hb-ot-layout-gsub-table.hh',
|
|
|
|
'hb-ot-layout-gsubgpos.hh',
|
|
|
|
'hb-ot-layout-jstf-table.hh',
|
2018-05-16 23:28:53 +00:00
|
|
|
'hb-ot-layout.cc',
|
2020-03-24 11:34:33 +00:00
|
|
|
'hb-ot-layout.hh',
|
2018-05-16 23:28:53 +00:00
|
|
|
'hb-ot-map.cc',
|
2020-03-24 11:34:33 +00:00
|
|
|
'hb-ot-map.hh',
|
|
|
|
'hb-ot-math-table.hh',
|
2018-05-16 23:28:53 +00:00
|
|
|
'hb-ot-math.cc',
|
2020-03-24 11:34:33 +00:00
|
|
|
'hb-ot-maxp-table.hh',
|
|
|
|
'hb-ot-meta-table.hh',
|
|
|
|
'hb-ot-meta.cc',
|
|
|
|
'hb-ot-metrics.cc',
|
|
|
|
'hb-ot-metrics.hh',
|
|
|
|
'hb-ot-name-language-static.hh',
|
|
|
|
'hb-ot-name-language.hh',
|
|
|
|
'hb-ot-name-table.hh',
|
|
|
|
'hb-ot-name.cc',
|
|
|
|
'hb-ot-os2-table.hh',
|
|
|
|
'hb-ot-os2-unicode-ranges.hh',
|
|
|
|
'hb-ot-post-macroman.hh',
|
|
|
|
'hb-ot-post-table.hh',
|
|
|
|
'hb-ot-shape-complex-arabic-fallback.hh',
|
|
|
|
'hb-ot-shape-complex-arabic-table.hh',
|
|
|
|
'hb-ot-shape-complex-arabic-win1256.hh',
|
2018-05-16 23:28:53 +00:00
|
|
|
'hb-ot-shape-complex-arabic.cc',
|
2020-03-24 11:34:33 +00:00
|
|
|
'hb-ot-shape-complex-arabic.hh',
|
2018-05-16 23:28:53 +00:00
|
|
|
'hb-ot-shape-complex-default.cc',
|
|
|
|
'hb-ot-shape-complex-hangul.cc',
|
|
|
|
'hb-ot-shape-complex-hebrew.cc',
|
|
|
|
'hb-ot-shape-complex-indic-table.cc',
|
2020-03-24 11:34:33 +00:00
|
|
|
'hb-ot-shape-complex-indic.cc',
|
|
|
|
'hb-ot-shape-complex-indic.hh',
|
2018-05-16 23:28:53 +00:00
|
|
|
'hb-ot-shape-complex-khmer.cc',
|
2020-03-24 11:34:33 +00:00
|
|
|
'hb-ot-shape-complex-khmer.hh',
|
2018-05-16 23:28:53 +00:00
|
|
|
'hb-ot-shape-complex-myanmar.cc',
|
2020-03-24 11:34:33 +00:00
|
|
|
'hb-ot-shape-complex-myanmar.hh',
|
2018-05-16 23:28:53 +00:00
|
|
|
'hb-ot-shape-complex-thai.cc',
|
|
|
|
'hb-ot-shape-complex-use-table.cc',
|
2020-03-24 11:34:33 +00:00
|
|
|
'hb-ot-shape-complex-use.cc',
|
|
|
|
'hb-ot-shape-complex-use.hh',
|
2018-11-14 22:25:41 +00:00
|
|
|
'hb-ot-shape-complex-vowel-constraints.cc',
|
2020-03-24 11:34:33 +00:00
|
|
|
'hb-ot-shape-complex-vowel-constraints.hh',
|
|
|
|
'hb-ot-shape-complex.hh',
|
2018-05-16 23:28:53 +00:00
|
|
|
'hb-ot-shape-fallback.cc',
|
2020-03-24 11:34:33 +00:00
|
|
|
'hb-ot-shape-fallback.hh',
|
|
|
|
'hb-ot-shape-normalize.cc',
|
|
|
|
'hb-ot-shape-normalize.hh',
|
|
|
|
'hb-ot-shape.cc',
|
|
|
|
'hb-ot-shape.hh',
|
|
|
|
'hb-ot-stat-table.hh',
|
|
|
|
'hb-ot-tag-table.hh',
|
|
|
|
'hb-ot-tag.cc',
|
|
|
|
'hb-ot-var-avar-table.hh',
|
|
|
|
'hb-ot-var-fvar-table.hh',
|
|
|
|
'hb-ot-var-gvar-table.hh',
|
|
|
|
'hb-ot-var-hvar-table.hh',
|
|
|
|
'hb-ot-var-mvar-table.hh',
|
2018-05-16 23:28:53 +00:00
|
|
|
'hb-ot-var.cc',
|
2020-03-24 11:34:33 +00:00
|
|
|
'hb-ot-vorg-table.hh',
|
|
|
|
'hb-pool.hh',
|
|
|
|
'hb-sanitize.hh',
|
|
|
|
'hb-serialize.hh',
|
|
|
|
'hb-set-digest.hh',
|
|
|
|
'hb-set.cc',
|
|
|
|
'hb-set.hh',
|
|
|
|
'hb-shape-plan.cc',
|
|
|
|
'hb-shape-plan.hh',
|
|
|
|
'hb-shape.cc',
|
|
|
|
'hb-shaper-impl.hh',
|
|
|
|
'hb-shaper-list.hh',
|
|
|
|
'hb-shaper.cc',
|
|
|
|
'hb-shaper.hh',
|
|
|
|
'hb-static.cc',
|
|
|
|
'hb-string-array.hh',
|
|
|
|
'hb-ucd-table.hh',
|
|
|
|
'hb-ucd.cc',
|
|
|
|
'hb-unicode-emoji-table.hh',
|
|
|
|
'hb-unicode.cc',
|
|
|
|
'hb-unicode.hh',
|
|
|
|
'hb-utf.hh',
|
|
|
|
'hb-vector.hh',
|
|
|
|
'hb.hh',
|
2018-05-16 23:28:53 +00:00
|
|
|
]
|
|
|
|
|
2020-03-24 11:34:33 +00:00
|
|
|
hb_base_ragel_generated_sources = [
|
|
|
|
'hb-buffer-deserialize-json.hh',
|
2020-03-24 14:45:09 +00:00
|
|
|
'hb-buffer-deserialize-text.hh',
|
|
|
|
'hb-number-parser.hh',
|
|
|
|
'hb-ot-shape-complex-indic-machine.hh',
|
|
|
|
'hb-ot-shape-complex-khmer-machine.hh',
|
|
|
|
'hb-ot-shape-complex-myanmar-machine.hh',
|
|
|
|
'hb-ot-shape-complex-use-machine.hh',
|
2020-03-24 11:34:33 +00:00
|
|
|
]
|
|
|
|
hb_base_ragel_sources = [
|
|
|
|
'hb-buffer-deserialize-json.rl',
|
2020-03-24 14:45:09 +00:00
|
|
|
'hb-buffer-deserialize-text.rl',
|
|
|
|
'hb-number-parser.rl',
|
|
|
|
'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',
|
2020-03-24 11:34:33 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
hb_base_headers = [
|
|
|
|
'hb-aat-layout.h',
|
|
|
|
'hb-aat.h',
|
|
|
|
'hb-blob.h',
|
|
|
|
'hb-buffer.h',
|
|
|
|
'hb-common.h',
|
|
|
|
'hb-deprecated.h',
|
|
|
|
'hb-draw.h',
|
|
|
|
'hb-face.h',
|
|
|
|
'hb-font.h',
|
|
|
|
'hb-map.h',
|
2018-11-14 22:25:41 +00:00
|
|
|
'hb-ot-color.h',
|
2020-03-24 11:34:33 +00:00
|
|
|
'hb-ot-deprecated.h',
|
2018-05-16 23:28:53 +00:00
|
|
|
'hb-ot-font.h',
|
|
|
|
'hb-ot-layout.h',
|
|
|
|
'hb-ot-math.h',
|
2020-03-24 11:34:33 +00:00
|
|
|
'hb-ot-meta.h',
|
|
|
|
'hb-ot-metrics.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',
|
2020-03-24 11:34:33 +00:00
|
|
|
'hb-ot.h',
|
|
|
|
'hb-set.h',
|
|
|
|
'hb-shape-plan.h',
|
|
|
|
'hb-shape.h',
|
|
|
|
'hb-unicode.h',
|
|
|
|
'hb-version.h',
|
|
|
|
'hb.h',
|
2018-05-16 23:28:53 +00:00
|
|
|
]
|
|
|
|
|
2020-03-24 11:34:33 +00:00
|
|
|
# Optional Sources and Headers with external deps
|
2018-05-16 23:28:53 +00:00
|
|
|
|
2020-03-24 11:34:33 +00:00
|
|
|
hb_ft_sources = ['hb-ft.cc']
|
|
|
|
hb_ft_headers = ['hb-ft.h']
|
2018-05-16 23:28:53 +00:00
|
|
|
|
2020-03-24 11:34:33 +00:00
|
|
|
hb_glib_sources = ['hb-glib.cc']
|
|
|
|
hb_glib_headers = ['hb-glib.h']
|
2018-05-16 23:28:53 +00:00
|
|
|
|
2020-03-24 11:34:33 +00:00
|
|
|
hb_graphite2_sources = ['hb-graphite2.cc']
|
|
|
|
hb_graphite2_headers = ['hb-graphite2.h']
|
2018-05-16 23:28:53 +00:00
|
|
|
|
2020-03-24 11:34:33 +00:00
|
|
|
# System-dependent sources and headers
|
2018-05-16 23:28:53 +00:00
|
|
|
|
2020-03-24 11:34:33 +00:00
|
|
|
hb_coretext_sources = ['hb-coretext.cc']
|
|
|
|
hb_coretext_headers = ['hb-coretext.h']
|
2018-05-16 23:28:53 +00:00
|
|
|
|
2020-03-24 11:34:33 +00:00
|
|
|
hb_directwrite_sources = ['hb-directwrite.cc']
|
|
|
|
hb_directwrite_headers = ['hb-directwrite.h']
|
|
|
|
|
|
|
|
hb_gdi_sources = ['hb-gdi.cc']
|
|
|
|
hb_gdi_headers = ['hb-gdi.h']
|
|
|
|
|
|
|
|
hb_uniscribe_sources = ['hb-uniscribe.cc']
|
|
|
|
hb_uniscribe_headers = ['hb-uniscribe.h']
|
2018-05-16 23:28:53 +00:00
|
|
|
|
2020-03-24 11:34:33 +00:00
|
|
|
# Sources for libharfbuzz-gobject and libharfbuzz-icu
|
|
|
|
hb_icu_sources = ['hb-icu.cc']
|
|
|
|
hb_icu_headers = ['hb-icu.h']
|
2018-05-16 23:28:53 +00:00
|
|
|
|
2020-03-24 11:34:33 +00:00
|
|
|
# Sources for libharfbuzz-subset
|
2018-05-16 23:28:53 +00:00
|
|
|
hb_subset_sources = [
|
2020-03-24 11:34:33 +00:00
|
|
|
'hb-number.cc',
|
|
|
|
'hb-number.hh',
|
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',
|
2020-03-24 11:34:33 +00:00
|
|
|
'hb-subset-cff-common.cc',
|
|
|
|
'hb-subset-cff-common.hh',
|
2018-11-16 16:26:06 +00:00
|
|
|
'hb-subset-cff1.cc',
|
2020-03-24 11:34:33 +00:00
|
|
|
'hb-subset-cff1.hh',
|
2018-11-16 16:26:06 +00:00
|
|
|
'hb-subset-cff2.cc',
|
2020-03-24 11:34:33 +00:00
|
|
|
'hb-subset-cff2.hh',
|
2018-05-16 23:28:53 +00:00
|
|
|
'hb-subset-input.cc',
|
2020-03-24 11:34:33 +00:00
|
|
|
'hb-subset-input.hh',
|
2018-05-16 23:28:53 +00:00
|
|
|
'hb-subset-plan.cc',
|
2020-03-24 11:34:33 +00:00
|
|
|
'hb-subset-plan.hh',
|
|
|
|
'hb-subset-plan.hh',
|
|
|
|
'hb-subset.cc',
|
|
|
|
'hb-subset.hh',
|
|
|
|
'hb-subset.hh',
|
2018-05-16 23:28:53 +00:00
|
|
|
]
|
|
|
|
|
2020-03-24 11:34:33 +00:00
|
|
|
hb_subset_headers = ['hb-subset.h']
|
2018-05-16 23:28:53 +00:00
|
|
|
|
|
|
|
hb_gobject_sources = [
|
|
|
|
'hb-gobject-structs.cc'
|
|
|
|
]
|
|
|
|
|
2020-03-24 11:34:33 +00:00
|
|
|
hb_gobject_headers = [
|
2018-05-16 23:28:53 +00:00
|
|
|
'hb-gobject.h',
|
|
|
|
'hb-gobject-structs.h',
|
2020-03-24 11:34:33 +00:00
|
|
|
]
|
2018-05-16 23:28:53 +00:00
|
|
|
|
|
|
|
incsrc = include_directories('.')
|
|
|
|
|
2020-03-24 11:34:33 +00:00
|
|
|
hb_sources = hb_base_sources + hb_base_ragel_generated_sources
|
|
|
|
hb_headers = hb_base_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
|
|
|
|
|
2020-03-13 10:01:17 +00:00
|
|
|
if conf.get('HAVE_GDI', 0) == 1
|
2020-03-24 11:34:33 +00:00
|
|
|
hb_sources += hb_gdi_sources
|
|
|
|
hb_headers += hb_gdi_headers
|
2020-03-13 10:01:17 +00:00
|
|
|
endif
|
|
|
|
|
2018-05-16 23:28:53 +00:00
|
|
|
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
|
|
|
|
|
2018-11-12 16:56:56 +00:00
|
|
|
if conf.get('HAVE_UNISCRIBE', 0) == 1
|
2020-03-24 11:34:33 +00:00
|
|
|
hb_sources += hb_uniscribe_sources
|
|
|
|
hb_headers += hb_uniscribe_headers
|
2018-11-12 16:56:56 +00:00
|
|
|
endif
|
|
|
|
|
2018-11-12 16:56:56 +00:00
|
|
|
if conf.get('HAVE_DIRECTWRITE', 0) == 1
|
2020-03-24 11:34:33 +00:00
|
|
|
hb_sources += hb_directwrite_sources
|
|
|
|
hb_headers += hb_directwrite_headers
|
2018-11-12 16:56:56 +00:00
|
|
|
endif
|
|
|
|
|
2018-11-12 16:56:56 +00:00
|
|
|
if conf.get('HAVE_CORETEXT', 0) == 1
|
2020-03-24 11:34:33 +00:00
|
|
|
hb_sources += hb_coretext_sources
|
|
|
|
hb_headers += hb_coretext_headers
|
2018-11-12 16:56:56 +00:00
|
|
|
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
|
|
|
|
|
2020-04-18 20:24:24 +00:00
|
|
|
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
|
|
|
|
deps += [icu_dep]
|
|
|
|
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'
|
|
|
|
|
2020-03-13 04:07:06 +00:00
|
|
|
extra_hb_cpp_args = []
|
2020-03-13 08:00:09 +00:00
|
|
|
if cpp.get_id() == 'msvc'
|
|
|
|
if get_option('default_library') == 'shared'
|
|
|
|
extra_hb_cpp_args += '-DHB_DLL_EXPORT'
|
|
|
|
endif
|
|
|
|
hb_so_version = ''
|
|
|
|
hb_lib_prefix = ''
|
|
|
|
else
|
|
|
|
hb_so_version = '0'
|
|
|
|
hb_lib_prefix = 'lib'
|
2020-03-13 04:07:06 +00:00
|
|
|
endif
|
|
|
|
|
2018-05-16 23:28:53 +00:00
|
|
|
libharfbuzz = library('harfbuzz', hb_sources,
|
2020-03-24 11:34:33 +00:00
|
|
|
include_directories: incconfig,
|
2018-05-16 23:28:53 +00:00
|
|
|
dependencies: deps,
|
2020-03-13 04:07:06 +00:00
|
|
|
cpp_args: cpp_args + extra_hb_cpp_args,
|
2020-03-13 08:00:09 +00:00
|
|
|
soversion: hb_so_version,
|
2018-06-05 00:15:43 +00:00
|
|
|
version: version,
|
|
|
|
install: true,
|
2020-03-13 08:00:09 +00:00
|
|
|
name_prefix: hb_lib_prefix)
|
2018-05-16 23:28:53 +00:00
|
|
|
|
2018-10-12 14:11:49 +00:00
|
|
|
libharfbuzz_dep = declare_dependency(
|
|
|
|
link_with: libharfbuzz,
|
2020-03-24 11:34:33 +00:00
|
|
|
include_directories: incsrc,
|
2018-10-12 14:11:49 +00:00
|
|
|
dependencies: deps)
|
|
|
|
|
2020-03-26 09:04:28 +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')
|
|
|
|
|
|
|
|
libharfbuzz_subset = library('harfbuzz-subset', hb_subset_sources,
|
|
|
|
include_directories: incconfig,
|
|
|
|
link_with: [libharfbuzz],
|
|
|
|
cpp_args: cpp_args + extra_hb_cpp_args,
|
|
|
|
soversion: hb_so_version,
|
|
|
|
version: version,
|
|
|
|
install: true,
|
|
|
|
name_prefix: hb_lib_prefix)
|
|
|
|
|
|
|
|
libharfbuzz_subset_dep = declare_dependency(
|
|
|
|
link_with: libharfbuzz_subset,
|
|
|
|
include_directories: incsrc,
|
|
|
|
dependencies: deps)
|
|
|
|
|
2020-03-24 18:13:02 +00:00
|
|
|
# TODO: MSVC gives the following,
|
|
|
|
# error LNK2019: unresolved external symbol "unsigned __int64 const * const _hb_NullPool"
|
|
|
|
if cpp.get_id() != 'msvc'
|
|
|
|
noinst_programs = {
|
|
|
|
'main': 'main.cc',
|
|
|
|
'test-basics': 'test.cc',
|
|
|
|
'test-buffer-serialize': 'test-buffer-serialize.cc',
|
|
|
|
'test-ot-meta': 'test-ot-meta.cc',
|
|
|
|
'test-ot-name': 'test-ot-name.cc',
|
|
|
|
'test-ot-glyphname': 'test-ot-glyphname.cc',
|
|
|
|
'test-ot-gpos-size-params': 'test-gpos-size-params.cc',
|
|
|
|
'test-ot-gsub-would-substitute': 'test-gsub-would-substitute.cc',
|
|
|
|
}
|
|
|
|
foreach name, source : noinst_programs
|
|
|
|
executable(name, source,
|
|
|
|
include_directories: incconfig,
|
|
|
|
cpp_args: cpp_args,
|
|
|
|
dependencies: libharfbuzz_dep,
|
|
|
|
install: false,
|
|
|
|
)
|
|
|
|
endforeach
|
|
|
|
endif
|
2020-03-24 11:34:33 +00:00
|
|
|
|
|
|
|
check_programs = {
|
|
|
|
'dump-indic-data': ['dump-indic-data.cc', 'hb-ot-shape-complex-indic-table.cc'],
|
|
|
|
'dump-khmer-data': ['dump-khmer-data.cc', 'hb-ot-shape-complex-indic-table.cc'],
|
|
|
|
'dump-myanmar-data': ['dump-myanmar-data.cc', 'hb-ot-shape-complex-indic-table.cc'],
|
|
|
|
'dump-use-data': ['dump-use-data.cc', 'hb-ot-shape-complex-use-table.cc'],
|
|
|
|
}
|
|
|
|
foreach name, source : check_programs
|
|
|
|
executable(name, source,
|
|
|
|
include_directories: incconfig,
|
|
|
|
cpp_args: cpp_args,
|
2020-03-24 18:05:41 +00:00
|
|
|
dependencies: libharfbuzz_dep,
|
|
|
|
install: false,
|
2020-03-24 11:34:33 +00:00
|
|
|
)
|
|
|
|
endforeach
|
|
|
|
|
|
|
|
compiled_tests = {
|
|
|
|
'test-array': 'test-array.cc',
|
|
|
|
'test-number': ['test-number.cc', 'hb-number.cc'],
|
|
|
|
'test-ot-tag': 'hb-ot-tag.cc',
|
|
|
|
'test-unicode-ranges': 'test-unicode-ranges.cc',
|
|
|
|
}
|
2020-03-24 14:25:56 +00:00
|
|
|
if cpp.get_id() != 'msvc'
|
|
|
|
# TODO: MSVC doesn't like these, fix them
|
|
|
|
compiled_tests += {
|
|
|
|
'test-algs': ['test-algs.cc', 'hb-static.cc'],
|
2020-03-24 18:23:38 +00:00
|
|
|
'test-bimap': ['test-bimap.cc', 'hb-static.cc'],
|
2020-03-24 14:25:56 +00:00
|
|
|
'test-iter': ['test-iter.cc', 'hb-static.cc'],
|
|
|
|
'test-meta': ['test-meta.cc', 'hb-static.cc'],
|
|
|
|
}
|
|
|
|
endif
|
2020-03-24 11:34:33 +00:00
|
|
|
foreach name, source : compiled_tests
|
|
|
|
test(name, executable(name, source,
|
|
|
|
include_directories: incconfig,
|
|
|
|
cpp_args: cpp_args + ['-DMAIN', '-UNDEBUG'],
|
2020-03-24 18:05:41 +00:00
|
|
|
dependencies: libharfbuzz_dep,
|
|
|
|
install: false,
|
2020-03-24 11:34:33 +00:00
|
|
|
))
|
|
|
|
endforeach
|
|
|
|
|
|
|
|
if host_machine.system() != 'windows' and not meson.is_cross_build()
|
|
|
|
# Some of them should be ported to python
|
|
|
|
dist_check_script = [
|
|
|
|
'check-c-linkage-decls.sh',
|
2020-03-24 14:45:09 +00:00
|
|
|
'check-externs.sh',
|
|
|
|
'check-header-guards.sh',
|
2020-03-26 09:04:28 +00:00
|
|
|
'check-static-inits.sh',
|
2020-03-24 11:34:33 +00:00
|
|
|
]
|
2020-03-24 14:25:01 +00:00
|
|
|
if not get_option('amalgam')
|
2020-03-26 09:04:28 +00:00
|
|
|
dist_check_script += 'check-includes.sh'
|
2020-03-24 14:25:01 +00:00
|
|
|
endif
|
2020-03-24 11:34:33 +00:00
|
|
|
if false # !WITH_LIBSTDCXX
|
2020-03-26 09:04:28 +00:00
|
|
|
dist_check_script += 'check-libstdc++.sh' # See https://github.com/harfbuzz/harfbuzz/issues/2276
|
2020-03-24 11:34:33 +00:00
|
|
|
endif
|
2020-03-24 14:25:01 +00:00
|
|
|
|
2020-03-26 09:04:28 +00:00
|
|
|
env = environment()
|
|
|
|
env.set('srcdir', meson.current_source_dir())
|
|
|
|
env.set('builddir', meson.current_build_dir())
|
|
|
|
env.set('libs', meson.current_build_dir()) # TODO: Merge this with builddir after autotools removal
|
|
|
|
env.set('HBSOURCES', ' '.join(hb_sources))
|
|
|
|
env.set('HBHEADERS', ' '.join(hb_headers))
|
|
|
|
|
2020-03-24 11:34:33 +00:00
|
|
|
foreach name : dist_check_script
|
|
|
|
test(name, find_program(name), env: env)
|
|
|
|
endforeach
|
|
|
|
|
2020-03-26 09:04:28 +00:00
|
|
|
test('check-symbols.sh', find_program('check-symbols.sh'),
|
|
|
|
depends: [harfbuzz_def, harfbuzz_subset_def], # TODO: harfbuzz_icu_def and harfbuzz_gobject_def also
|
|
|
|
env: env)
|
|
|
|
endif
|
2018-10-12 14:11:49 +00:00
|
|
|
|
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(),
|
|
|
|
)
|
|
|
|
|
2020-04-18 20:24:24 +00:00
|
|
|
if have_icu and not have_icu_builtin
|
2020-04-18 18:22:45 +00:00
|
|
|
libharfbuzz_icu = library('harfbuzz-icu', [hb_icu_sources, hb_icu_headers],
|
|
|
|
include_directories: incconfig,
|
|
|
|
dependencies: icu_dep,
|
|
|
|
link_with: [libharfbuzz],
|
|
|
|
cpp_args: cpp_args + extra_hb_cpp_args,
|
|
|
|
soversion: hb_so_version,
|
|
|
|
version: version,
|
|
|
|
install: true,
|
|
|
|
name_prefix: hb_lib_prefix)
|
|
|
|
|
|
|
|
libharfbuzz_icu_dep = declare_dependency(
|
|
|
|
link_with: libharfbuzz_icu,
|
|
|
|
include_directories: incsrc,
|
|
|
|
dependencies: deps)
|
|
|
|
|
|
|
|
pkgmod.generate(libharfbuzz_icu,
|
|
|
|
description: 'HarfBuzz text shaping library ICU integration',
|
|
|
|
subdirs: [meson.project_name()],
|
|
|
|
version: meson.project_version(),
|
|
|
|
)
|
|
|
|
else
|
|
|
|
libharfbuzz_icu_dep = dependency('', required: false)
|
|
|
|
endif
|
|
|
|
|
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],
|
2020-03-13 04:07:06 +00:00
|
|
|
cpp_args: cpp_args + extra_hb_cpp_args,
|
2020-03-13 08:00:09 +00:00
|
|
|
soversion: hb_so_version,
|
2018-06-05 00:15:43 +00:00
|
|
|
version: version,
|
|
|
|
install: true,
|
2020-03-13 08:00:09 +00:00
|
|
|
name_prefix: hb_lib_prefix)
|
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_',
|
2020-04-18 12:37:03 +00:00
|
|
|
symbol_prefix: ['hb', 'hb_gobject'],
|
2018-11-14 13:49:03 +00:00
|
|
|
includes: ['GObject-2.0'],
|
2020-04-18 12:37:03 +00:00
|
|
|
export_packages: ['harfbuzz-gobject'],
|
|
|
|
header: 'hb-gobject.h',
|
2018-11-14 13:49:03 +00:00
|
|
|
install: true,
|
|
|
|
extra_args: ['--cflags-begin',
|
|
|
|
'-DHB_H',
|
|
|
|
'-DHB_H_IN',
|
|
|
|
'-DHB_OT_H',
|
|
|
|
'-DHB_OT_H_IN',
|
2020-04-18 12:37:03 +00:00
|
|
|
'-DHB_AAT_H',
|
|
|
|
'-DHB_AAT_H_IN',
|
2018-11-14 13:49:03 +00:00
|
|
|
'-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,
|
2020-03-13 04:15:28 +00:00
|
|
|
sources: build_gir ? hb_gen_files_gir : hb_gobject_sources,
|
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())
|