1 | // Copyright © SixtyFPS GmbH <info@slint.dev> |
2 | // SPDX-License-Identifier: MIT |
3 | |
4 | fn main() -> std::io::Result<()> { |
5 | #[allow (unused)] |
6 | let mut board_config_path: Option<std::path::PathBuf> = None; |
7 | |
8 | cfg_if::cfg_if! { |
9 | if #[cfg(feature = "pico-st7789" )] { |
10 | board_config_path = Some([env!("CARGO_MANIFEST_DIR" ), "pico_st7789" , "board_config.toml" ].iter().collect()); |
11 | } else if #[cfg(feature = "pico2-st7789" )] { |
12 | board_config_path = Some([env!("CARGO_MANIFEST_DIR" ), "pico2_st7789" , "board_config.toml" ].iter().collect()); |
13 | } else if #[cfg(feature = "stm32h735g" )] { |
14 | board_config_path = Some([env!("CARGO_MANIFEST_DIR" ), "stm32h735g" , "board_config.toml" ].iter().collect()); |
15 | } else if #[cfg(feature = "stm32u5g9j-dk2" )] { |
16 | board_config_path = Some([env!("CARGO_MANIFEST_DIR" ), "stm32u5g9j_dk2" , "board_config.toml" ].iter().collect()); |
17 | } |
18 | } |
19 | |
20 | if let Some(path: PathBuf) = board_config_path { |
21 | println!("cargo:BOARD_CONFIG_PATH= {}" , path.display()) |
22 | } |
23 | |
24 | println!("cargo:EMBED_TEXTURES=1" ); |
25 | |
26 | Ok(()) |
27 | } |
28 | |