x264-rs/build.rs
jiangcuo e72f12c06b
Some checks failed
CI / Check (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Lint (push) Has been cancelled
first commit
2026-07-06 17:41:51 +08:00

17 lines
371 B
Rust

extern crate pkg_config;
fn main() {
let x264 = pkg_config::Config::new()
.cargo_metadata(false)
.probe("x264")
.expect("Is x264 installed?");
let n: Option<u64> = x264.version.split('.').nth(1).and_then(|n| n.parse().ok());
if let Some(n) = n {
if n >= 149 {
println!("cargo:rustc-cfg=yuyv");
}
}
}