Skip to content

Commit

Permalink
build/gtk3: Add missing dependencies to gresource target
Browse files Browse the repository at this point in the history
gtk3_assets and gtk3_hidpi_assets were overwritten instead of added
to an array, so the gresource target only had dependencies on the
last custom_targets.

This fixes the build with samurai which fails with

samu: job failed: /usr/local/bin/glib-compile-resources --sourcedir=common/gtk-3.0 --target=common/gtk-3.0/gtk-lighter.gresource common/gtk-3.0/gtk-lighter.gresource.xml
common/gtk-3.0/gtk-lighter.gresource.xml: Failed to locate checkbox-checked.png

Samurai is a Ninja-compatible build tool [0].  The above failure
can probably also happen with Ninja given a sufficient number of
build jobs.

[0] https://github.com/michaelforney/samurai

#123
  • Loading branch information
Tobias Kortkamp authored and jnsh committed Apr 9, 2021
1 parent b99b13b commit 4cc5e4a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions common/gtk-3.0/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,11 @@ gtk3_asset_names = run_command(

assets_svg = gtk3_ver / 'assets.svg'

gtk3_assets = []
gtk3_hidpi_assets = []

foreach asset : gtk3_asset_names
gtk3_assets = custom_target(
gtk3_assets += custom_target(
'gtk3-' + asset,
input : assets_svg,
output : asset + '.png',
Expand All @@ -58,7 +61,7 @@ foreach asset : gtk3_asset_names
build_by_default : true
)

gtk3_hidpi_assets = custom_target(
gtk3_hidpi_assets += custom_target(
'gtk3-' + asset + '-hidpi',
input : assets_svg,
output : asset + '@2.png',
Expand Down

0 comments on commit 4cc5e4a

Please sign in to comment.