blob: 1f300eaf2ec9c6f670ee98d2949d5a5ce57bc761 [file] [log] [blame]
Mathieu Duponchelle920efc02018-05-17 01:28:53 +02001hb_view_sources = [
2 'hb-view.cc',
Mathieu Duponchelle920efc02018-05-17 01:28:53 +02003]
4
5hb_shape_sources = [
6 'hb-shape.cc',
Mathieu Duponchelle920efc02018-05-17 01:28:53 +02007]
8
Behdad Esfahbodca903f72023-01-19 12:40:27 -07009hb_info_sources = [
10 'hb-info.cc',
11]
12
Mathieu Duponchelle920efc02018-05-17 01:28:53 +020013hb_ot_shape_closure_sources = [
14 'hb-ot-shape-closure.cc',
Mathieu Duponchelle920efc02018-05-17 01:28:53 +020015]
16
17hb_subset_cli_sources = [
18 'hb-subset.cc',
Garret Riegerd30c1da2023-11-15 20:16:07 +000019 'helper-subset.hh',
Mathieu Duponchelle920efc02018-05-17 01:28:53 +020020]
21
Christoph Reiter03bd6ea2020-06-03 23:52:10 +020022util_deps = [freetype_dep, cairo_dep, cairo_ft_dep, glib_dep]
23
Mathieu Duponchelle99b26782018-05-17 14:53:20 -070024if conf.get('HAVE_GLIB', 0) == 1
Khaled Hosny6add69a2022-12-16 19:54:00 +020025 if conf.get('HAVE_CAIRO', 0) == 1
Mathieu Duponchelle99b26782018-05-17 14:53:20 -070026 hb_view = executable('hb-view', hb_view_sources,
27 cpp_args: cpp_args,
Tim-Philipp Müller618584e2018-11-14 20:19:36 +000028 include_directories: [incconfig, incsrc],
Hans Petter Jansson8298c2f2021-04-23 18:37:58 +020029 dependencies: [util_deps, chafa_dep],
Matthias Clasen0d6ee462022-12-25 10:50:56 -050030 link_with: [libharfbuzz, libharfbuzz_cairo],
Mathieu Duponchelle484313f2018-06-05 02:15:43 +020031 install: true,
Mathieu Duponchelle99b26782018-05-17 14:53:20 -070032 )
Nirbheek Chauhanc7dd63d2022-12-18 09:28:47 +053033 meson.override_find_program('hb-view', hb_view)
Mathieu Duponchelle99b26782018-05-17 14:53:20 -070034 endif
Mathieu Duponchelle920efc02018-05-17 01:28:53 +020035
Mathieu Duponchelle99b26782018-05-17 14:53:20 -070036 hb_shape = executable('hb-shape', hb_shape_sources,
37 cpp_args: cpp_args,
Tim-Philipp Müller618584e2018-11-14 20:19:36 +000038 include_directories: [incconfig, incsrc],
Christoph Reiter03bd6ea2020-06-03 23:52:10 +020039 dependencies: util_deps,
Mathieu Duponchelle484313f2018-06-05 02:15:43 +020040 link_with: [libharfbuzz],
41 install: true,
Mathieu Duponchelle99b26782018-05-17 14:53:20 -070042 )
Nirbheek Chauhanc7dd63d2022-12-18 09:28:47 +053043 meson.override_find_program('hb-shape', hb_shape)
Mathieu Duponchelle920efc02018-05-17 01:28:53 +020044
Khaled Hosny1cf61f32023-01-23 13:43:35 +020045 hb_info = executable('hb-info', [hb_info_sources, gobject_enums_h],
Behdad Esfahbodca903f72023-01-19 12:40:27 -070046 cpp_args: cpp_args,
47 include_directories: [incconfig, incsrc],
Behdad Esfahbod7a29ded2023-01-24 16:59:44 -070048 dependencies: [util_deps, libharfbuzz_gobject_dep, chafa_dep],
Khaled Hosny37ab12a2023-01-23 01:02:51 +020049 link_with: [libharfbuzz],
Behdad Esfahbodca903f72023-01-19 12:40:27 -070050 install: true,
51 )
52 meson.override_find_program('hb-info', hb_info)
53
Mathieu Duponchelle99b26782018-05-17 14:53:20 -070054 hb_subset = executable('hb-subset', hb_subset_cli_sources,
55 cpp_args: cpp_args,
Tim-Philipp Müller618584e2018-11-14 20:19:36 +000056 include_directories: [incconfig, incsrc],
Christoph Reiter03bd6ea2020-06-03 23:52:10 +020057 dependencies: util_deps,
Mathieu Duponchelle484313f2018-06-05 02:15:43 +020058 link_with: [libharfbuzz, libharfbuzz_subset],
59 install: true,
Mathieu Duponchelle99b26782018-05-17 14:53:20 -070060 )
Nirbheek Chauhanc7dd63d2022-12-18 09:28:47 +053061 meson.override_find_program('hb-subset', hb_subset)
Mathieu Duponchelle99b26782018-05-17 14:53:20 -070062
63 hb_ot_shape_closure = executable('hb-ot-shape-closure', hb_ot_shape_closure_sources,
64 cpp_args: cpp_args,
Tim-Philipp Müller618584e2018-11-14 20:19:36 +000065 include_directories: [incconfig, incsrc],
Christoph Reiter03bd6ea2020-06-03 23:52:10 +020066 dependencies: util_deps,
Mathieu Duponchelle484313f2018-06-05 02:15:43 +020067 link_with: [libharfbuzz],
68 install: true,
Mathieu Duponchelle99b26782018-05-17 14:53:20 -070069 )
Nirbheek Chauhanc7dd63d2022-12-18 09:28:47 +053070 meson.override_find_program('hb-ot-shape-closure', hb_ot_shape_closure)
Garret Riegerd30c1da2023-11-15 20:16:07 +000071
72 if get_option('experimental_api')
73 test('test-hb-subset-parsing',
74 executable('test-hb-subset-parsing',
75 ['test-hb-subset-parsing.c', 'helper-subset.hh'],
76 cpp_args: cpp_args,
77 c_args: ['-DHB_EXPERIMENTAL_API'],
78 include_directories: [incconfig, incsrc],
79 dependencies: util_deps,
80 link_with: [libharfbuzz, libharfbuzz_subset],
81 install: false,
82 ),
83 workdir : meson.current_source_dir(),
84 suite: ['util'])
85 endif
Tim-Philipp Müller49ba2112018-11-12 15:36:27 +000086else
87 # Disable tests that use this
88 hb_shape = disabler()
89 hb_subset = disabler()
Mathieu Duponchelle484313f2018-06-05 02:15:43 +020090endif