[meson] Make it work with Windows. * meson.build: Do not process `ftconfig.h` when not using `ftconfig.h.in`. Fixes #1029.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
diff --git a/ChangeLog b/ChangeLog
index 7945b1e..5b0aab4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2021-03-07 Xavier Claessens <xavier.claessens@collabora.com>
+
+ [meson] Make it work with Windows.
+
+ * meson.build: Do not process `ftconfig.h` when not using
+ `ftconfig.h.in`.
+
+ Fixes #1029.
+
2021-02-25 Werner Lemberg <wl@gnu.org>
[woff2] Fix memory leak.
diff --git a/meson.build b/meson.build
index dc32255..93b4894 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=<ftconfig.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=<ftconfig.h>']
-
ft2_lib = library('freetype',
sources: ft2_sources + [ftmodule_h],