mirror of
https://git.proxmox.com/git/proxmox-backup-qemu
synced 2025-10-04 15:46:10 +00:00
21 lines
561 B
Rust
21 lines
561 B
Rust
// build.rs
|
|
extern crate cbindgen;
|
|
|
|
use std::env;
|
|
|
|
fn main() {
|
|
let crate_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
|
|
let header = std::fs::read_to_string("header-preamble.c").unwrap();
|
|
|
|
cbindgen::Builder::new()
|
|
.with_language(cbindgen::Language::C)
|
|
.with_crate(&crate_dir)
|
|
.with_header(header)
|
|
.with_include_guard("PROXMOX_BACKUP_QEMU_H")
|
|
.generate()
|
|
.unwrap()
|
|
.write_to_file("proxmox-backup-qemu.h");
|
|
|
|
println!("cargo:rustc-cdylib-link-arg=-Wl,-soname,libproxmox_backup_qemu.so.0");
|
|
}
|