Welcome to mirror list, hosted at ThFree Co, Russian Federation.

build.rs « threadshare « generic - gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 27f10df9ca2e749e959a096df94901949c49c41e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
fn main() {
    let gstreamer = pkg_config::probe_library("gstreamer-1.0").unwrap();
    let gstrtp = pkg_config::probe_library("gstreamer-rtp-1.0").unwrap();
    let includes = [gstreamer.include_paths, gstrtp.include_paths];

    let mut build = cc::Build::new();

    for p in includes.iter().flatten() {
        build.include(p);
    }

    build.file("src/jitterbuffer/rtpjitterbuffer.c");
    build.file("src/jitterbuffer/rtpstats.c");

    build.define("RTPJitterBuffer", "TsRTPJitterBuffer");
    build.define("RTPJitterBufferClass", "TsRTPJitterBufferClass");
    build.define("RTPJitterBufferPrivate", "TsRTPJitterBufferClass");

    build.compile("libthreadshare-c.a");

    println!("cargo:rustc-link-lib=dylib=gstrtp-1.0");

    for path in gstrtp.link_paths.iter() {
        println!(
            "cargo:rustc-link-search=native={}",
            path.to_str().expect("library path doesn't exist")
        );
    }

    gst_plugin_version_helper::get_info()
}