slint/demos/printerdemo/rust/build.rs
Olivier Goffart c9de4d94dd printerdemo: Don't use cfg! in the build script
That is compiled on the host. Use the TARGET env variable instead
2024-11-19 17:23:52 +01:00

11 lines
424 B
Rust

// Copyright © SixtyFPS GmbH <info@slint.dev>
// SPDX-License-Identifier: MIT
fn main() {
let mut config = slint_build::CompilerConfiguration::new();
let target = std::env::var("TARGET").unwrap();
if target.contains("android") || target.contains("wasm32") {
config = config.with_bundled_translations("../lang");
}
slint_build::compile_with_config("../ui/printerdemo.slint", config).unwrap();
}