* meson.build: Support FT_DEBUG_LOGGING option.

If this option is set, we need threads support.
This commit is contained in:
Werner Lemberg 2021-07-04 18:57:49 +02:00
parent 5e32a03496
commit 78eee48d97
2 changed files with 16 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2021-07-04 Werner Lemberg <wl@gnu.org>
* meson.build: Support `FT_DEBUG_LOGGING` option.
If this option is set, we need threads support.
2021-07-03 Werner Lemberg <wl@gnu.org>
* meson_options.txt: Sort alphabetically; no final full stops.

View File

@ -73,6 +73,7 @@ ft_main_modules = run_command(python_exe,
ft2_sources += files([
'src/base/ftbase.c',
'src/base/ftinit.c',
'src/dlg/dlgwrap.c',
])
foreach mod: ft_main_modules
@ -231,6 +232,15 @@ endif
ft2_deps = []
# Check whether threads support is needed and available.
if cc.has_header_symbol('freetype/config/ftoption.h', 'FT_DEBUG_LOGGING',
include_directories: ft2_includes)
thread_dep = dependency('threads',
required: true)
ft2_deps += [thread_dep]
endif
# Generate `ftoption.h` based on available dependencies.
process_header_command = [python_exe,