slint/examples/carousel/rust/build.rs
Florian Blasius b87705aa56
Add mcu support to the carousel example (#1744)
The carousel example can be now also run on the supported mcu devices
2022-10-19 14:54:39 +02:00

15 lines
544 B
Rust

// Copyright © SixtyFPS GmbH <info@slint-ui.com>
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
#[cfg(not(feature = "mcu"))]
fn main() {
slint_build::compile("../ui/carousel_demo.slint").unwrap();
}
#[cfg(feature = "mcu")]
fn main() {
let config = slint_build::CompilerConfiguration::new()
.embed_resources(slint_build::EmbedResourcesKind::EmbedForSoftwareRenderer);
slint_build::compile_with_config("../ui/carousel_demo.slint", config).unwrap();
slint_build::print_rustc_flags().unwrap();
}