freetype/meson_options.txt
Xavier Claessens 2c40559609 Meson: Fix dependency lookup and generate ftconfig.h
[meson] Fix dependency lookup and generate `ftconfig.h`.

- zlib: If not found on the system, meson can build it as a
  subproject.  We thus never use the (outdated) zlib support that
  comes with FreeType.  Doing so has the additional advantage that
  the zlib code can be shared with other projects like GLib if both
  are subprojects of an application.
- harfbuzz: Build as a subproject if not found on the system.
- 'QUESTION: What if the compiler doesn't support `-D` but uses `/D`
  instead as on Windows?'  Answer: Meson translate arguments for us.
- visibility: Replace self-made code with meson-specific solution.

* meson.build (ft2_defines): Rewrite logic to set and handle it.
(process_header_command): New variable, previously called
`ftoption_command`.
(ftoption_command, ftconfig_command): New variables.
(zlib_option): Removed.
(zlib_dep): New variable.
(ft2_deps): Updated.
(harfbuzz_dep): Updated.
(ftconfig_h_in, ftconfig_h): New variables.
(ft2_sources): Updated.
(ft2_lib): Updated, handle visibility.
(summary): Updted.

* meson_options.txt (zlib): Updated.
2021-02-09 16:11:39 +01:00

47 lines
1.3 KiB
Meson

#
# meson_options.txt
#
# Copyright (C) 2020-2021 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
# and distributed under the terms of the FreeType project license,
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
# indicate that you have read the license and understand and accept it
# fully.
option('zlib',
type: 'feature',
value: 'auto',
description: 'Support reading gzip-compressed font files.')
option('bzip2',
type: 'feature',
value: 'auto',
description: 'Support reading bzip2-compressed font files.')
option('png',
type: 'feature',
value: 'auto',
description: 'Support color bitmap glyph formats in the PNG format.'
+ 'Requires libpng.')
option('harfbuzz',
type: 'feature',
value: 'auto',
description: 'Use Harfbuzz library to improve auto-hinting.'
+ ' If available, many glyphs not directly addressable'
+ ' by a font\'s character map will be hinted also.')
option('brotli',
type: 'feature',
value: 'auto',
description: 'Use Brotli library to support decompressing WOFF2 fonts.')
option('mmap',
type: 'feature',
value: 'auto',
description: 'Use mmap() to open font files for faster parsing.')