Cmake build system for esp32 #1

Merged
franchioping merged 8 commits from cmake_esp32 into master 2026-04-02 16:55:09 +01:00
1 changed files with 5 additions and 3 deletions
Showing only changes of commit 90298ad35d - Show all commits

View File

@ -2,10 +2,12 @@ use std::path::{Path, PathBuf};
use std::{env, time};
fn main() {
let cargo_dir = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap());
let target_dir = PathBuf::from(env::var("CARGO_BUILD_TARGET_DIR").unwrap());
if env::var("CARGO_BUILD_TARGET_DIR").is_ok() {
let cargo_dir = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap());
let target_dir = PathBuf::from(env::var("CARGO_BUILD_TARGET_DIR").unwrap());
run_cbindgen(&cargo_dir, &target_dir);
run_cbindgen(&cargo_dir, &target_dir);
}
}
fn run_cbindgen(cargo_dir: &Path, target_dir: &Path) {