gst-plugins-rs/generic/gst-plugin-threadshare/build.rs
Arun Raghavan 205b6040fb Reorganise plugins into directories by function
This should start making navigating the tree a little easier to start
with, and we can then move to allowing building specific groups of
plugins as well.

The plugins are moved into the following hierarchy:

  audio
    / gst-plugin-audiofx
    / gst-plugin-claxon
    / gst-plugin-csound
    / gst-plugin-lewton
  generic
    / gst-plugin-file
    / gst-plugin-sodium
    / gst-plugin-threadshare
  net
    / gst-plugin-reqwest
    / gst-plugin-rusoto
  utils
    / gst-plugin-fallbackswitch
    / gst-plugin-togglerecord
  video
    / gst-plugin-cdg
    / gst-plugin-closedcaption
    / gst-plugin-dav1d
    / gst-plugin-flv
    / gst-plugin-gif
    / gst-plugin-rav1e

  gst-plugin-tutorial
  gst-plugin-version-helper
2020-04-05 19:10:46 +00:00

36 lines
1 KiB
Rust

extern crate cc;
extern crate gst_plugin_version_helper;
extern crate pkg_config;
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()
}