This repository has been archived on 2024-05-28. You can view files and clone it, but cannot push or open issues or pull requests.
stm32u5_cargo/build.rs
2023-11-14 23:53:53 +00:00

21 lines
492 B
Rust

// build.rs
use cmake::Config;
fn main() {
// Tell Cargo to tell rustc to link the C++ library.
println!("cargo:rustc-link-lib=static=stm32u5");
// Use cmake to build the C++ project
let dst = Config::new("stm32u5").build();
// Tell Cargo where to find the compiled library
println!("cargo:rustc-link-search=native={}", dst.display());
// get the out dir of dependcy `cortex-m`
//
println!("cargo:include=/includes") // provide DEP_U5_INCLUDE var
}