Skip to content

Commit 0effc8f

Browse files
committed
build: Fix stylesheet dependency for GTK gresources
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
1 parent f8f674d commit 0effc8f

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

common/gtk-3.0/meson.build

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,11 @@ input_scss_dark = configure_file(
3030
'sass_path' : meson.current_source_dir() / 'sass',
3131
}
3232
)
33+
3334
output_css_dark = 'gtk-main-dark.css'
34-
gtk3_stylesheet = custom_target(
35+
gtk3_stylesheets = []
36+
37+
gtk3_stylesheets += custom_target(
3538
output_css_dark,
3639
input : input_scss_dark,
3740
output : output_css_dark,
@@ -54,7 +57,7 @@ foreach variant : get_option('variants')
5457
}
5558
)
5659

57-
gtk3_stylesheet = custom_target(
60+
gtk3_stylesheets += custom_target(
5861
output_css,
5962
input : input_scss,
6063
output : output_css,
@@ -110,7 +113,7 @@ foreach variant : get_option('variants')
110113
'--target=@OUTPUT@',
111114
'@INPUT@'
112115
],
113-
depends : [gtk3_assets, gtk3_hidpi_assets, gtk3_stylesheet],
116+
depends : [gtk3_assets, gtk3_hidpi_assets, gtk3_stylesheets],
114117
depend_files : [gtk3_asset_files, gtk3_hidpi_asset_files],
115118
build_by_default : true
116119
)

common/gtk-4.0/meson.build

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,11 @@ input_scss_dark = configure_file(
6262
'sass_path' : meson.current_source_dir() / gtk4_ver / 'sass',
6363
}
6464
)
65+
6566
output_css_dark = 'gtk-main-dark.css'
66-
gtk4_stylesheet = custom_target(
67+
gtk4_stylesheets = []
68+
69+
gtk4_stylesheets += custom_target(
6770
output_css_dark,
6871
input : input_scss_dark,
6972
output : output_css_dark,
@@ -86,7 +89,7 @@ foreach variant : get_option('variants')
8689
}
8790
)
8891

89-
gtk4_stylesheet = custom_target(
92+
gtk4_stylesheets += custom_target(
9093
output_css,
9194
input : input_scss,
9295
output : output_css,
@@ -143,7 +146,7 @@ foreach variant : get_option('variants')
143146
'--target=@OUTPUT@',
144147
'@INPUT@'
145148
],
146-
depends : [gtk4_assets, gtk4_hidpi_assets, gtk4_stylesheet],
149+
depends : [gtk4_assets, gtk4_hidpi_assets, gtk4_stylesheets],
147150
depend_files : [gtk4_asset_files, gtk4_hidpi_asset_files],
148151
build_by_default : true
149152
)

0 commit comments

Comments
 (0)