Skip to content

Commit

Permalink
fix: fixed compile-time errors during cross-compiling
Browse files Browse the repository at this point in the history
  • Loading branch information
Chiichen authored Mar 2, 2024
1 parent 77902bd commit 475307d
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions lvgl-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,13 @@ fn main() {
cfg.include(&drivers);
#[cfg(feature = "drivers")]
cfg.includes(incl_extra.split(','));

cfg.includes(["/usr/include", "/usr/local/include"]);
cfg.compile("lvgl");

let mut cc_args = vec![
let cc_args = vec![
"-DLV_CONF_INCLUDE_SIMPLE=1",
"-I/usr/include",
"-I/usr/local/include",
"-I",
lv_config_dir.to_str().unwrap(),
"-I",
Expand All @@ -167,11 +169,6 @@ fn main() {

// Set correct target triple for bindgen when cross-compiling
let target = env::var("TARGET").expect("Cargo build scripts always have TARGET");
let host = env::var("HOST").expect("Cargo build scripts always have HOST");
if target != host {
cc_args.push("-target");
cc_args.push(target.as_str());
}

let mut additional_args = Vec::new();
if target.ends_with("emscripten") {
Expand Down

0 comments on commit 475307d

Please sign in to comment.