gst-plugins-rs/gst-plugin/build.rs

32 lines
937 B
Rust
Raw Normal View History

// Copyright (C) 2016-2017 Sebastian Dröge <sebastian@centricular.com>
2016-05-15 15:54:09 +00:00
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
2016-05-15 15:54:09 +00:00
2016-05-13 13:35:48 +00:00
extern crate gcc;
extern crate pkg_config;
fn main() {
let gstreamer = pkg_config::probe_library("gstreamer-1.0").unwrap();
let gstbase = pkg_config::probe_library("gstreamer-base-1.0").unwrap();
let includes = [gstreamer.include_paths, gstbase.include_paths];
2017-04-10 15:42:58 +00:00
let files = ["src/demuxer.c"];
2016-05-13 13:35:48 +00:00
let mut config = gcc::Config::new();
config.include("src");
for f in files.iter() {
config.file(f);
}
for p in includes.iter().flat_map(|i| i) {
config.include(p);
}
config.compile("librsplugin-c.a");
}