mirror of
https://github.com/szymon-jozef/libnotify-rs.git
synced 2026-10-27 19:20:43 +01:00
Compare commits
1 Commits
fix/compil
...
fix/compil
| Author | SHA1 | Date | |
|---|---|---|---|
| 6d8672537f |
7
build.rs
7
build.rs
@@ -2,7 +2,9 @@ use std::env;
|
||||
use std::path::PathBuf;
|
||||
|
||||
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
|
||||
.include_paths
|
||||
@@ -17,7 +19,8 @@ fn main() {
|
||||
.generate()
|
||||
.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
|
||||
.write_to_file(out_path.join("bindings.rs"))
|
||||
|
||||
@@ -17,9 +17,6 @@
|
||||
#![allow(non_snake_case)]
|
||||
#![warn(missing_docs)]
|
||||
|
||||
#[cfg(not(target_os = "linux"))]
|
||||
compile_error!("Libnotify-rs only supports linux");
|
||||
|
||||
/// Basic libnotify rust wrapper
|
||||
pub mod api;
|
||||
/// Higher level abstraction over api
|
||||
|
||||
Reference in New Issue
Block a user