Compatibility with CMake build

This commit is contained in:
ivmarkov 2022-05-02 15:37:08 +03:00
parent e441b44daf
commit a273bfc554

View File

@ -2,11 +2,11 @@
fn main() -> anyhow::Result<()> {
embuild::build::CfgArgs::output_propagated("ESP_IDF")?;
// Will not be available when built a CMake-first or a PIO-first build
// Will not be available when built with a CMake-first or a PIO-first build
// We need to output these only when building the examples' binaries anyway
embuild::build::LinkArgs::try_from_env("ESP_IDF")
.ok()
.map(|args| args.output());
if let Some(args) = embuild::build::LinkArgs::try_from_env("ESP_IDF").ok() {
args.output();
}
Ok(())
}