Fix C++ Ninja build on Windows

For Ninja builds we instruct the compiler to generate a dependency file.
This would include paths like builtin:/native/../common/slint-logo-light.svg,
which my version of Ninja on Windows doesn't like at all and just flat out aborts on.

It doesn't make sense for us to emit those as dependencies, so this patch excludes
builtin paths.
This commit is contained in:
Simon Hausmann 2022-11-23 16:36:41 +01:00 committed by Simon Hausmann
parent 0b66628fc4
commit f0d7009133

View file

@ -69,8 +69,12 @@ fn main() -> std::io::Result<()> {
}
}
for resource in doc.root_component.embedded_file_resources.borrow().keys() {
if !fileaccess::load_file(&std::path::Path::new(resource))
.map_or(false, |f| f.is_builtin())
{
write!(f, " {}", resource)?;
}
}
writeln!(f)?;
}