Skip to content

Commit 4dfefee

Browse files
committed
add copy files from src dir too
1 parent 4412aaa commit 4dfefee

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

mimes/meson.build

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,25 @@ foreach template : templates
138138
meson.project_build_root() / 'mimes' / size / template[1] + '.svg'
139139
)
140140

141+
message('adding template decoration: ' + template[1] + '.svg @ ' + size)
142+
run_command(
143+
python3,
144+
'@[email protected]'.format(join_paths(meson.project_source_root(), 'scripts', 'composite-svg')),
145+
'@[email protected]'.format(join_paths(meson.current_source_dir(), size, 'decoration-template')),
146+
# We operate entirely in the build directory here, because we are
147+
# cascading off of a previously composited file
148+
'@[email protected]'.format(join_paths(meson.project_build_root(), 'mimes', size, template[1])),
149+
'@[email protected]'.format(join_paths(meson.project_build_root(), 'mimes', size, template[1])),
150+
check: true
151+
)
152+
elif fs.is_file(meson.project_source_root() / 'mimes' / size / template[0] + '.svg')
153+
message ('copying base file ' + template[0] + ' to template file ' + template[1])
154+
run_command(
155+
'cp',
156+
meson.project_source_root() / 'mimes' / size / template[0] + '.svg',
157+
meson.project_build_root() / 'mimes' / size / template[1] + '.svg'
158+
)
159+
141160
message('adding template decoration: ' + template[1] + '.svg @ ' + size)
142161
run_command(
143162
python3,

0 commit comments

Comments
 (0)