sd-device-sys 0.1.2

FFI bindings to `systemd/sd-devices.h`
Documentation
extern crate pkg_config;

use std::process::ExitCode;

fn main() -> ExitCode {
    match pkg_config::Config::new()
        .atleast_version("247")
        .probe("systemd")
    {
        Ok(lib) => {
            for path in lib.link_paths {
                println!("cargo:rustc-link-search=native={}", path.to_string_lossy());
            }
            for dylib in lib.libs {
                println!("cargo:rustc-link-lib=dylib={}", dylib);
            }
        }
        Err(_) => {
            eprintln!("Failed to find systemd development files");
            return ExitCode::FAILURE;
        }
    }
    ExitCode::SUCCESS
}