File: build.rs

package info (click to toggle)
rust-seccomp-sys 0.1.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 132 kB
  • sloc: makefile: 4
file content (20 lines) | stat: -rw-r--r-- 483 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use std::env;

fn main() {
    let rustc_link_type = match env::var("LIBSECCOMP_LIB_TYPE") {
        Ok(mode) => mode, // static, framework, dylib
        Err(_) => String::from("dylib")
    };

    println!(
        "cargo:rustc-link-lib={}={}",
        rustc_link_type,
        "seccomp"
    );

    match env::var("LIBSECCOMP_LIB_PATH") {
        Ok(rustc_link_search) =>
            println!("cargo:rustc-link-search=native={}", rustc_link_search),
        Err(_) => {}
    };
}