add use-vendored-config feature
This commit is contained in:
parent
faa3a19215
commit
601a87d513
3 changed files with 14 additions and 4 deletions
|
@ -22,3 +22,6 @@ cty = "0.2.1"
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
cc = "1.0.68"
|
cc = "1.0.68"
|
||||||
bindgen = "0.59.2"
|
bindgen = "0.59.2"
|
||||||
|
|
||||||
|
[features]
|
||||||
|
use-vendored-config = []
|
||||||
|
|
|
@ -19,10 +19,16 @@ fn main() {
|
||||||
// so let's use the vendored `lv_conf.h` file.
|
// so let's use the vendored `lv_conf.h` file.
|
||||||
vendor.join("include")
|
vendor.join("include")
|
||||||
}
|
}
|
||||||
Err(_) => panic!(
|
Err(_) => {
|
||||||
"The environment variable {} is required to be defined",
|
#[cfg(not(feature = "use-vendored-config"))]
|
||||||
CONFIG_NAME
|
panic!(
|
||||||
),
|
"The environment variable {} is required to be defined",
|
||||||
|
CONFIG_NAME
|
||||||
|
);
|
||||||
|
|
||||||
|
#[cfg(feature = "use-vendored-config")]
|
||||||
|
vendor.join("include")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@ bitflags = "1.2.1"
|
||||||
[features]
|
[features]
|
||||||
alloc = ["cstr_core/alloc"]
|
alloc = ["cstr_core/alloc"]
|
||||||
lvgl_alloc = ["alloc"]
|
lvgl_alloc = ["alloc"]
|
||||||
|
use-vendored-config = ["lvgl-sys/use-vendored-config"]
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
quote = "1.0.9"
|
quote = "1.0.9"
|
||||||
|
|
Loading…
Reference in a new issue