Gimp/build/windows/meson.build
Jan Tojnar e4cbfab5ae meson: Fix build from tarball
Since 2afa019c70,
the Meson configure step will fail when building from tarball (missing `.git` and `gitversion.h` is present)
because `gitversion_h` variable will contain a `list[file]` but `custom_target` does not like that in its `depends` kwarg.
2022-03-18 16:05:58 +00:00

35 lines
1,009 B
Meson

# Windows specific
configure_file(
input : 'gimp-plug-ins.rc.in',
output: 'gimp-plug-ins.rc',
configuration: versionconfig,
)
configure_file(
input : 'gimp.rc.in',
output: 'gimp.rc',
configuration: versionconfig,
)
# Basically, the build rules below do nothing (a mere `python -c 'exit()'` call).
# But because they depends on `git-version.h`, meson ensure that it gets built first,
# Then the result of this targets is used in 35+ resource compiler build rules.
#
# Nasty trick indeed, but it fixes race condition issue described in GNOME/GIMP#6257.
gimp_plugins_rc = custom_target('gimp_plugins_rc',
build_by_default: true,
build_always_stale: true,
command: [python, '-c', 'exit()'],
depends: generate_version_h ? [gitversion_h] : [],
output: ['gimp-plug-ins.rc']
)
gimp_app_rc = custom_target('gimp_app_rc',
build_by_default: true,
build_always_stale: true,
command: [python, '-c', 'exit()'],
depends: generate_version_h ? [gitversion_h] : [],
output: ['gimp.rc']
)