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]
|
||||
cc = "1.0.68"
|
||||
bindgen = "0.59.2"
|
||||
|
||||
[features]
|
||||
use-vendored-config = []
|
||||
|
|
|
@ -19,10 +19,16 @@ fn main() {
|
|||
// so let's use the vendored `lv_conf.h` file.
|
||||
vendor.join("include")
|
||||
}
|
||||
Err(_) => panic!(
|
||||
"The environment variable {} is required to be defined",
|
||||
CONFIG_NAME
|
||||
),
|
||||
Err(_) => {
|
||||
#[cfg(not(feature = "use-vendored-config"))]
|
||||
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]
|
||||
alloc = ["cstr_core/alloc"]
|
||||
lvgl_alloc = ["alloc"]
|
||||
use-vendored-config = ["lvgl-sys/use-vendored-config"]
|
||||
|
||||
[build-dependencies]
|
||||
quote = "1.0.9"
|
||||
|
|
Loading…
Reference in a new issue