Merge pull request #8 from szymon-jozef/fix/compilation-error

fix: set messages next to crash during build
This commit is contained in:
Szymon
2026-10-03 21:37:58 +02:00
committed by GitHub

View File

@@ -2,7 +2,9 @@ use std::env;
use std::path::PathBuf; use std::path::PathBuf;
fn main() { fn main() {
let library = pkg_config::Config::new().probe("libnotify").unwrap(); let library = pkg_config::Config::new()
.probe("libnotify")
.expect("Cannot locate libnotify. Is it installed?");
let paths = library let paths = library
.include_paths .include_paths
@@ -17,7 +19,8 @@ fn main() {
.generate() .generate()
.expect("Unable to generate bindings"); .expect("Unable to generate bindings");
let out_path = PathBuf::from(env::var("OUT_DIR").unwrap()); let out_path =
PathBuf::from(env::var("OUT_DIR").expect("Out $OUT_DIR not set. Perhaps a bindgen error?"));
bindings bindings
.write_to_file(out_path.join("bindings.rs")) .write_to_file(out_path.join("bindings.rs"))