fn main() {
println!("cargo:rerun-if-changed=build.rs");
#[cfg(feature = "widget")]
require_library(
"gtk4",
if cfg!(feature = "native") {
"4.0.1"
} else {
"4.0"
},
);
#[cfg(feature = "native")]
require_library("vte-2.91-gtk4", "0.70");
}
#[cfg(feature = "widget")]
fn require_library(package: &str, minimum: &str) {
pkg_config::Config::new()
.atleast_version(minimum)
.cargo_metadata(false)
.probe(package)
.unwrap_or_else(|error| {
panic!(
"LiosBar requires {package} >= {minimum} development files for the target. \
Provision with `cargo install lios && lios install` or your \
distribution's GTK4/VTE GTK4 packages. GTK3 VTE is not interchangeable.\n{error}"
)
});
}