librespot/protocol/build.rs

23 lines
588 B
Rust
Raw Normal View History

extern crate protobuf_build;
use std::env;
use std::path::PathBuf;
fn main() {
let root = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap());
let out = PathBuf::from(env::var("OUT_DIR").unwrap());
let proto = root.join("proto");
2015-06-23 14:38:29 +00:00
let mut compiler = protobuf_build::Compiler::new(&proto, &out);
for file in &["keyexchange.proto",
"authentication.proto",
"mercury.proto",
"metadata.proto",
"pubsub.proto",
"spirc.proto"] {
compiler.compile(file).unwrap();
}
}