Skip to content

Commit 8527080

Browse files
committed
fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! feat: add esp-idf compilation feature
1 parent a439b23 commit 8527080

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

libcoap-sys/build.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ fn main() {
4949
embuild::espidf::sysenv::output();
5050
let esp_idf_path = embuild::espidf::sysenv::idf_path().ok_or("missing IDF path").unwrap();
5151
println!("cargo:warning={}", &esp_idf_path);
52-
let esp_idf_buildroot = env::var_os("DEP_ESP_IDF_ROOT").unwrap();
52+
let esp_idf_buildroot = env::var_os("DEP_ESP_IDF_ROOT").unwrap().to_string_lossy();
5353
let esp_include_path = embuild::espidf::sysenv::cincl_args().ok_or("missing IDF cincl args").unwrap();
5454

5555
let arg_splitter = regex::Regex::new(r##"(?:[^\\]"[^"]*[^\\]")?(\s)"##).unwrap();
@@ -63,7 +63,9 @@ fn main() {
6363
.clang_arg("xtensa") // Will need to be adjusted for RISC-V ESPs, workaround according to https://github.com/esp-rs/esp-idf-sys/blob/7a0747614cdd3a65cf4ac8094bbeebfee980dbb2/build/build.rs#L119
6464
.clang_arg("-DESP_PLATFORM")
6565
.clang_arg(format!("-I{}/components/lwip/lwip/src/include", esp_idf_path))
66-
.clang_arg(format!("-I{}/managed_components/espressif__coap/libcoap/include", esp_idf_buildroot.to_string_lossy()));
66+
.clang_arg(format!("-I{}/managed_components/espressif__coap/libcoap/include", esp_idf_buildroot))
67+
.clang_arg(format!("-I{}/build/config/", esp_idf_buildroot))
68+
;
6769
//for arg in &esp_clang_args {
6870
// println!("cargo:warning={}", arg);
6971
//}

0 commit comments

Comments
 (0)