summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorWerner Lemberg <wl@gnu.org>2020-10-26 18:09:56 +0100
committerWerner Lemberg <wl@gnu.org>2020-10-26 18:09:56 +0100
commit40c5681ab92e7db1298273ccf3c816e6a1498260 (patch)
tree17a726f3f716f41f11d4307ee6a4a42ccba65d0e /meson.build
parent007c109b4594c5e63948bd08b4d5011ad76ffb10 (diff)
downloadfreetype2-40c5681ab92e7db1298273ccf3c816e6a1498260.tar.gz
* meson.build: Fix 'harfbuzz' and 'brotli' build options (#59347).
Without this patch, 'harfbuzz' and 'brotli' are always required. Patch submitted anonymously in Savannah bug report.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build12
1 files changed, 8 insertions, 4 deletions
diff --git a/meson.build b/meson.build
index ea304954e..c99497653 100644
--- a/meson.build
+++ b/meson.build
@@ -267,13 +267,17 @@ ft2_deps += [libpng_dep]
harfbuzz_dep = dependency('harfbuzz',
version: '>= 1.8.0',
required: get_option('harfbuzz'))
-ftoption_command += ['--enable=FT_CONFIG_OPTION_USE_HARFBUZZ']
-ft2_deps += [harfbuzz_dep]
+if harfbuzz_dep.found()
+ ftoption_command += ['--enable=FT_CONFIG_OPTION_USE_HARFBUZZ']
+ ft2_deps += [harfbuzz_dep]
+endif
# Brotli decompression support
brotli_dep = dependency('libbrotlidec', required: get_option('brotli'))
-ftoption_command += ['--enable=FT_CONFIG_OPTION_USE_BROTLI']
-ft2_deps += [brotli_dep]
+if brotli_dep.found()
+ ftoption_command += ['--enable=FT_CONFIG_OPTION_USE_BROTLI']
+ ft2_deps += [brotli_dep]
+endif
# We can now generate `ftoption.h`.
ftoption_h = custom_target('ftoption.h',