mirror of https://github.com/GNOME/gimp.git
build, meson: Fix rc files build order dependency...
by adding special filler custom_target() build rules. Basically, these build rules do nothing (a mere meson --version call), but they ensure that `git-version.h` is built first, before the dependant rc files are used in respective resource compiler build targets. This still a nasty trick (not a proper solution), but it do the job. See #6257 for additional information.
This commit is contained in:
parent
dd02503cf8
commit
2afa019c70
|
@ -1,13 +1,37 @@
|
|||
# Windows specific
|
||||
|
||||
gimp_plugins_rc = configure_file(
|
||||
configure_file(
|
||||
input : 'gimp-plug-ins.rc.in',
|
||||
output: 'gimp-plug-ins.rc',
|
||||
configuration: versionconfig,
|
||||
)
|
||||
|
||||
gimp_app_rc = configure_file(
|
||||
configure_file(
|
||||
input : 'gimp.rc.in',
|
||||
output: 'gimp.rc',
|
||||
configuration: versionconfig,
|
||||
)
|
||||
|
||||
# Basically, the build rules below do nothing (a mere `meson --version` 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.
|
||||
|
||||
meson_command = find_program('meson')
|
||||
|
||||
gimp_plugins_rc = custom_target('git-version.h build-time-dependency for gimp_plugins_rc',
|
||||
build_by_default: true,
|
||||
build_always_stale: true,
|
||||
command: [meson_command, '--version'],
|
||||
depends: [gitversion_h],
|
||||
output: ['gimp-plug-ins.rc']
|
||||
).full_path()
|
||||
|
||||
gimp_app_rc = custom_target('git-version.h build-time-dependency for gimp.rc',
|
||||
build_by_default: true,
|
||||
build_always_stale: true,
|
||||
command: [meson_command, '--version'],
|
||||
depends: [gitversion_h],
|
||||
output: ['gimp.rc']
|
||||
).full_path()
|
||||
|
|
Loading…
Reference in New Issue