diff options
author | Chun-wei Fan <fanchunwei@src.gnome.org> | 2020-06-24 18:23:55 +0800 |
---|---|---|
committer | Chun-wei Fan <fanchunwei@src.gnome.org> | 2020-06-24 18:25:14 +0800 |
commit | 266886b6ff16cb0760b7bc904a62d4eb9e030930 (patch) | |
tree | 6dcfb85830d80b51a506c6983b6601854b42c6e8 /meson.build | |
parent | a03d61a3abbf1897d95a1e6cc258fc138fbff039 (diff) | |
download | gobject-introspection-266886b6ff16cb0760b7bc904a62d4eb9e030930.tar.gz |
meson.build: Fix generating pkg-config files
On Windows and Cygwin builds, we need to put the '.exe' for our entries
into the pkg-config files for 'g-ir-compiler' and 'g-ir-generate',
otherwise Meson will not be able to identify these programs correctly.
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/meson.build b/meson.build index a6f3a02e..658727d8 100644 --- a/meson.build +++ b/meson.build @@ -230,12 +230,19 @@ install_data('m4/introspection.m4', install_dir: join_paths(get_option('datadir' pkg = import('pkgconfig') +# We must put in the '.exe' extension for .exe executables +exe_ext = '' + +if host_system == 'windows' or host_system == 'cygwin' + exe_ext = '.exe' +endif + pkgconfig_variables = [ 'datadir=' + '${prefix}' / get_option('datadir'), 'bindir=' + '${prefix}' / get_option('bindir'), 'g_ir_scanner=${bindir}/g-ir-scanner', - 'g_ir_compiler=${bindir}/g-ir-compiler', - 'g_ir_generate=${bindir}/g-ir-generate', + 'g_ir_compiler=${bindir}/g-ir-compiler@0@'.format(exe_ext), + 'g_ir_generate=${bindir}/g-ir-generate@0@'.format(exe_ext), 'gidatadir=${datadir}/gobject-introspection-1.0', 'girdir=' + gir_dir_pc_prefix / 'gir-1.0', 'typelibdir=${libdir}/girepository-1.0', |