Add meson options to disable building harfbuzz-vector

This commit is contained in:
Khaled Hosny committed 2026-03-04 18:12:45 +02:00
1 parent 9520926168
commit 72ee0c2dfd
3 files changed
+53 -42

No files matched your search

+2
View File
@@ -31,6 +31,8 @@ option('wasm', type: 'feature', value: 'disabled',
description: 'Enable WebAssembly shaper backend (experimental)')
option('raster', type: 'feature', value: 'enabled',
description: 'Enable HarfBuzz glyph rasterization library')
option('vector', type: 'feature', value: 'enabled',
description: 'Enable HarfBuzz glyph vector drawing library')
# Common feature options
option('tests', type: 'feature', value: 'enabled', yield: true,
+31 -28
View File
@@ -790,38 +790,41 @@ if not get_option('raster').disabled()
)
endif
libharfbuzz_vector = library('harfbuzz-vector', hb_vector_sources,
include_directories: incconfig,
dependencies: [m_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: chosen_linker,
)
libharfbuzz_vector_dep = null_dep
if not get_option('vector').disabled()
libharfbuzz_vector = library('harfbuzz-vector', hb_vector_sources,
include_directories: incconfig,
dependencies: [m_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: chosen_linker,
)
install_headers(hb_vector_headers, subdir: meson.project_name())
install_headers(hb_vector_headers, subdir: meson.project_name())
libharfbuzz_vector_dep = declare_dependency(
link_with: libharfbuzz_vector,
include_directories: incsrc,
dependencies: [libharfbuzz_dep])
meson.override_dependency('harfbuzz-vector', libharfbuzz_vector_dep)
libharfbuzz_vector_dep = declare_dependency(
link_with: libharfbuzz_vector,
include_directories: incsrc,
dependencies: [libharfbuzz_dep])
meson.override_dependency('harfbuzz-vector', libharfbuzz_vector_dep)
harfbuzz_vector_def = custom_target('harfbuzz-vector.def',
command: gen_def_cmd,
input: hb_vector_headers,
output: 'harfbuzz-vector.def')
defs_list += [harfbuzz_vector_def]
harfbuzz_vector_def = custom_target('harfbuzz-vector.def',
command: gen_def_cmd,
input: hb_vector_headers,
output: 'harfbuzz-vector.def')
defs_list += [harfbuzz_vector_def]
pkgmod.generate(libharfbuzz_vector,
description: 'HarfBuzz vector converter',
requires: ['harfbuzz = @0@'.format(meson.project_version())],
subdirs: [meson.project_name()],
version: meson.project_version(),
)
pkgmod.generate(libharfbuzz_vector,
description: 'HarfBuzz vector converter',
requires: ['harfbuzz = @0@'.format(meson.project_version())],
subdirs: [meson.project_name()],
version: meson.project_version(),
)
endif
libharfbuzz_cairo_dep = null_dep
if conf.get('HAVE_CAIRO', 0) == 1
+20 -14
View File
@@ -76,14 +76,18 @@ if conf.get('HAVE_GLIB', 0) == 1
)
meson.override_find_program('hb-shape', hb_shape)
hb_vector = executable('hb-vector', hb_draw_sources,
cpp_args: cpp_args,
include_directories: [incconfig, incsrc],
dependencies: [util_deps],
link_with: [libharfbuzz, libharfbuzz_vector],
install: true,
)
meson.override_find_program('hb-vector', hb_vector)
if not get_option('vector').disabled()
hb_vector = executable('hb-vector', hb_draw_sources,
cpp_args: cpp_args,
include_directories: [incconfig, incsrc],
dependencies: [util_deps],
link_with: [libharfbuzz, libharfbuzz_vector],
install: true,
)
meson.override_find_program('hb-vector', hb_vector)
else
hb_vector = disabler()
endif
if not get_option('raster').disabled()
hb_raster_util = executable('hb-raster', hb_raster_sources,
@@ -120,12 +124,14 @@ if conf.get('HAVE_GLIB', 0) == 1
install: false,
)
hb_vector_svg_all = executable('hb-vector-svg-all', ['hb-vector-svg-all.c'],
cpp_args: cpp_args,
include_directories: [incconfig, incsrc],
link_with: [libharfbuzz, libharfbuzz_vector],
install: false,
)
if not get_option('vector').disabled()
hb_vector_svg_all = executable('hb-vector-svg-all', ['hb-vector-svg-all.c'],
cpp_args: cpp_args,
include_directories: [incconfig, incsrc],
link_with: [libharfbuzz, libharfbuzz_vector],
install: false,
)
endif
hb_paint_all = executable('hb-paint-all', ['hb-paint-all.c'],
cpp_args: cpp_args,