2016-05-15 15:54:09 +00:00
|
|
|
// Copyright (C) 2016 Sebastian Dröge <sebastian@centricular.com>
|
|
|
|
//
|
|
|
|
// This library is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU Library General Public
|
|
|
|
// License as published by the Free Software Foundation; either
|
|
|
|
// version 2 of the License, or (at your option) any later version.
|
|
|
|
//
|
|
|
|
// This library is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
// Library General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU Library General Public
|
|
|
|
// License along with this library; if not, write to the
|
|
|
|
// Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
// Boston, MA 02110-1301, USA.
|
|
|
|
|
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];
|
|
|
|
|
2016-12-25 11:16:12 +00:00
|
|
|
let files = ["src/error.c", "src/buffer.c", "src/log.c", "src/source.c", "src/sink.c", "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");
|
|
|
|
}
|