From d69d9c2397afc86e95fef48226364723e14d506c Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Sat, 13 Feb 2021 16:32:26 -0500 Subject: [meson] Make it work with Windows. * meson.build: Do not process `ftconfig.h` when not using `ftconfig.h.in`. Fixes #1029. --- meson.build | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'meson.build') diff --git a/meson.build b/meson.build index dc322553b..93b489487 100644 --- a/meson.build +++ b/meson.build @@ -288,6 +288,7 @@ if host_machine.system() == 'windows' ft2_defines += ['-DDLL_EXPORT=1'] endif + # Generate `ftconfig.h` ftconfig_command = process_header_command @@ -300,20 +301,17 @@ endif if host_machine.system() in ['linux', 'darwin', 'cygwin'] ftconfig_h_in = files('builds/unix/ftconfig.h.in') -else - ftconfig_h_in = files('include/freetype/config/ftconfig.h') + ftconfig_h = custom_target('ftconfig.h', + input: ftconfig_h_in, + output: 'ftconfig.h', + command: ftconfig_command, + install: true, + install_dir: 'include/freetype2/freetype/config', + ) + ft2_sources += ftconfig_h + ft2_defines += ['-DFT_CONFIG_CONFIG_H='] endif -ftconfig_h = custom_target('ftconfig.h', - input: ftconfig_h_in, - output: 'ftconfig.h', - command: ftconfig_command, - install: true, - install_dir: 'include/freetype2/freetype/config', -) -ft2_sources += ftconfig_h -ft2_defines += ['-DFT_CONFIG_CONFIG_H='] - ft2_lib = library('freetype', sources: ft2_sources + [ftmodule_h], -- cgit v1.2.1