mozjpeg-sys 0.3.1

FFI bindings for mozjpeg. MozJPEG is automatically fetched from git master and linked statically. Requires autotools and nasm.
1
2
3
4
5
6
7
8
9
10
11
12
13
fn main() {
    let num_jobs = std::env::var("NUM_JOBS").unwrap();
    let out_dir = std::env::var("OUT_DIR").unwrap();

    let mut cmd = std::process::Command::new("make");
    cmd.arg("-j").arg(num_jobs);

    if !cmd.status().unwrap().success() {
        panic!("Script failed");
    }

    println!("cargo:rustc-flags=-L {}", out_dir);
}