| 1 |
gtk2_light_assets = [] |
| 2 |
gtk2_light_asset_files = [] |
| 3 |
|
| 4 |
foreach asset : gtk2_asset_names |
| 5 |
|
| 6 |
asset_filename = asset + '.png' |
| 7 |
|
| 8 |
if fs.exists(asset_filename) |
| 9 |
gtk2_light_asset_files += meson.current_source_dir() / asset_filename |
| 10 |
else |
| 11 |
if not inkscape.found() |
| 12 |
error('Program \'inkscape\' not found') |
| 13 |
endif |
| 14 |
|
| 15 |
gtk2_light_assets += custom_target( |
| 16 |
'gtk2-light-' + asset, |
| 17 |
input : 'assets.svg', |
| 18 |
output : asset_filename, |
| 19 |
command : [ |
| 20 |
inkscape, |
| 21 |
'--export-id-only', |
| 22 |
inkscape_ver.version_compare('>=1.0') ? '--export-filename=@OUTPUT@' : '--export-png=@OUTPUT@', |
| 23 |
'--export-id=' + asset, |
| 24 |
'--export-dpi=96', |
| 25 |
'@INPUT@' |
| 26 |
], |
| 27 |
build_by_default : true |
| 28 |
) |
| 29 |
endif |
| 30 |
endforeach |