meson.build 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. hb_view_sources = [
  2. 'hb-view.cc',
  3. ]
  4. hb_shape_sources = [
  5. 'hb-shape.cc',
  6. ]
  7. hb_info_sources = [
  8. 'hb-info.cc',
  9. ]
  10. hb_ot_shape_closure_sources = [
  11. 'hb-ot-shape-closure.cc',
  12. ]
  13. hb_subset_cli_sources = [
  14. 'hb-subset.cc',
  15. 'helper-subset.hh',
  16. ]
  17. util_deps = [freetype_dep, cairo_dep, cairo_ft_dep, glib_dep]
  18. if conf.get('HAVE_GLIB', 0) == 1
  19. if conf.get('HAVE_CAIRO', 0) == 1
  20. hb_view = executable('hb-view', hb_view_sources,
  21. cpp_args: cpp_args,
  22. include_directories: [incconfig, incsrc],
  23. dependencies: [util_deps, chafa_dep],
  24. link_with: [libharfbuzz, libharfbuzz_cairo],
  25. install: true,
  26. )
  27. meson.override_find_program('hb-view', hb_view)
  28. endif
  29. hb_shape = executable('hb-shape', hb_shape_sources,
  30. cpp_args: cpp_args,
  31. include_directories: [incconfig, incsrc],
  32. dependencies: util_deps,
  33. link_with: [libharfbuzz],
  34. install: true,
  35. )
  36. meson.override_find_program('hb-shape', hb_shape)
  37. hb_info = executable('hb-info', [hb_info_sources, gobject_enums_h],
  38. cpp_args: cpp_args,
  39. include_directories: [incconfig, incsrc],
  40. dependencies: [util_deps, libharfbuzz_gobject_dep, chafa_dep],
  41. link_with: [libharfbuzz],
  42. install: true,
  43. )
  44. meson.override_find_program('hb-info', hb_info)
  45. hb_subset = executable('hb-subset', hb_subset_cli_sources,
  46. cpp_args: cpp_args,
  47. include_directories: [incconfig, incsrc],
  48. dependencies: util_deps,
  49. link_with: [libharfbuzz, libharfbuzz_subset],
  50. install: true,
  51. )
  52. meson.override_find_program('hb-subset', hb_subset)
  53. hb_ot_shape_closure = executable('hb-ot-shape-closure', hb_ot_shape_closure_sources,
  54. cpp_args: cpp_args,
  55. include_directories: [incconfig, incsrc],
  56. dependencies: util_deps,
  57. link_with: [libharfbuzz],
  58. install: true,
  59. )
  60. meson.override_find_program('hb-ot-shape-closure', hb_ot_shape_closure)
  61. if get_option('experimental_api')
  62. test('test-hb-subset-parsing',
  63. executable('test-hb-subset-parsing',
  64. ['test-hb-subset-parsing.c', 'helper-subset.hh'],
  65. cpp_args: cpp_args,
  66. c_args: ['-DHB_EXPERIMENTAL_API'],
  67. include_directories: [incconfig, incsrc],
  68. dependencies: util_deps,
  69. link_with: [libharfbuzz, libharfbuzz_subset],
  70. install: false,
  71. ),
  72. workdir : meson.current_source_dir(),
  73. suite: ['util'])
  74. endif
  75. else
  76. # Disable tests that use this
  77. hb_shape = disabler()
  78. hb_subset = disabler()
  79. endif