Skip to content

Commit

Permalink
make sure build file doesn't build to source dir
Browse files Browse the repository at this point in the history
  • Loading branch information
wpkelso committed Jan 26, 2025
1 parent 5557904 commit 57d21c5
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions mimes/meson.build
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
mime_sizes = ['16', '24', '32', '48', '64', '128']

python3 = find_program('python3')
composite-svg = '@[email protected]'.format(join_paths(meson.project_source_root(), 'scripts', 'composite-svg'))

mime_types = [
# The first argument is the icon name,
Expand Down Expand Up @@ -98,7 +97,7 @@ foreach type : mime_types

run_command(
python3,
composite-svg,
'@[email protected]'.format(join_paths(meson.project_source_root(), 'scripts', 'composite-svg')),
'@[email protected]'.format(join_paths(meson.current_source_dir(), size, type[0])),
'@[email protected]'.format(join_paths(meson.current_source_dir(), size, type[1])),
output_file,
Expand Down Expand Up @@ -126,14 +125,13 @@ templates = [
foreach template : templates
foreach size: mime_sizes
message('adding template decoration: ' + template + '.svg @ ' + size)
base-file = '@[email protected]'.format(join_paths(meson.current_source_dir(), size, template))

run_command(
python3,
composite-svg,
'@[email protected]'.format(join_paths(meson.current_source_dir(), size, 'decoration-template.svg')),
base-file,
base-file,
'@[email protected]'.format(join_paths(meson.project_source_root(), 'scripts', 'composite-svg')),
'@[email protected]'.format(join_paths(meson.current_source_dir(), size, 'decoration-template')),
'@[email protected]'.format(join_paths(meson.current_source_dir(), size, template)),
'@[email protected]'.format(join_paths(meson.project_build_root(), 'mimes', size, template)),
check: false
)
endforeach
Expand Down

0 comments on commit 57d21c5

Please sign in to comment.