mirror of
https://github.com/egor-white/zaprett.git
synced 2026-01-28 21:49:46 +05:00
19 lines
475 B
Rust
19 lines
475 B
Rust
use std::env;
|
|
use std::path::{Path, PathBuf};
|
|
use once_cell::sync::Lazy;
|
|
|
|
static NFQ: Lazy<PathBuf> = Lazy::new(|| {
|
|
let manifest_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
|
|
Path::new(&manifest_dir).join("libs/zapret/nfq")
|
|
});
|
|
|
|
fn main() {
|
|
cc::Build::new()
|
|
.file(NFQ.join("nfqws.c"))
|
|
.include(&*NFQ)
|
|
.compile("libnfqws.a");
|
|
|
|
println!("cargo:rustc-link-lib=static=nfqws");
|
|
println!("cargo:rerun-if-changed={}", NFQ.display());
|
|
}
|