Skip to content

Commit

Permalink
build: Fix stylesheet dependency for GTK gresources
Browse files Browse the repository at this point in the history
Since the stylesheet targets were not stored in an array, only the
main variant stylesheet target was a dependency for the theme
gresource. This could result the build to fail, if the dark
stylesheet was not generated in time.

Fixes: #170
  • Loading branch information
jnsh committed Jan 3, 2022
1 parent f8f674d commit 0effc8f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
9 changes: 6 additions & 3 deletions common/gtk-3.0/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@ input_scss_dark = configure_file(
'sass_path' : meson.current_source_dir() / 'sass',
}
)

output_css_dark = 'gtk-main-dark.css'
gtk3_stylesheet = custom_target(
gtk3_stylesheets = []

gtk3_stylesheets += custom_target(
output_css_dark,
input : input_scss_dark,
output : output_css_dark,
Expand All @@ -54,7 +57,7 @@ foreach variant : get_option('variants')
}
)

gtk3_stylesheet = custom_target(
gtk3_stylesheets += custom_target(
output_css,
input : input_scss,
output : output_css,
Expand Down Expand Up @@ -110,7 +113,7 @@ foreach variant : get_option('variants')
'--target=@OUTPUT@',
'@INPUT@'
],
depends : [gtk3_assets, gtk3_hidpi_assets, gtk3_stylesheet],
depends : [gtk3_assets, gtk3_hidpi_assets, gtk3_stylesheets],
depend_files : [gtk3_asset_files, gtk3_hidpi_asset_files],
build_by_default : true
)
Expand Down
9 changes: 6 additions & 3 deletions common/gtk-4.0/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,11 @@ input_scss_dark = configure_file(
'sass_path' : meson.current_source_dir() / gtk4_ver / 'sass',
}
)

output_css_dark = 'gtk-main-dark.css'
gtk4_stylesheet = custom_target(
gtk4_stylesheets = []

gtk4_stylesheets += custom_target(
output_css_dark,
input : input_scss_dark,
output : output_css_dark,
Expand All @@ -86,7 +89,7 @@ foreach variant : get_option('variants')
}
)

gtk4_stylesheet = custom_target(
gtk4_stylesheets += custom_target(
output_css,
input : input_scss,
output : output_css,
Expand Down Expand Up @@ -143,7 +146,7 @@ foreach variant : get_option('variants')
'--target=@OUTPUT@',
'@INPUT@'
],
depends : [gtk4_assets, gtk4_hidpi_assets, gtk4_stylesheet],
depends : [gtk4_assets, gtk4_hidpi_assets, gtk4_stylesheets],
depend_files : [gtk4_asset_files, gtk4_hidpi_asset_files],
build_by_default : true
)
Expand Down

0 comments on commit 0effc8f

Please sign in to comment.