From 78eee48d97ecf0d51ad0dac03e5c70dbc8406a58 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Sun, 4 Jul 2021 18:57:49 +0200 Subject: [PATCH] * meson.build: Support `FT_DEBUG_LOGGING` option. If this option is set, we need threads support. --- ChangeLog | 6 ++++++ meson.build | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/ChangeLog b/ChangeLog index 347d9762c..34ed7cdde 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2021-07-04 Werner Lemberg + + * meson.build: Support `FT_DEBUG_LOGGING` option. + + If this option is set, we need threads support. + 2021-07-03 Werner Lemberg * meson_options.txt: Sort alphabetically; no final full stops. diff --git a/meson.build b/meson.build index 13142bc24..6ddadc133 100644 --- a/meson.build +++ b/meson.build @@ -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,