mirror of
https://github.com/librespot-org/librespot.git
synced 2024-12-18 17:11:53 +00:00
24 lines
550 B
Rust
24 lines
550 B
Rust
extern crate vergen;
|
|
|
|
#[cfg(feature = "with-syntex")]
|
|
fn codegen() {
|
|
extern crate protobuf_macros;
|
|
extern crate serde_codegen;
|
|
|
|
use std::env;
|
|
use std::path::PathBuf;
|
|
|
|
let out = PathBuf::from(env::var("OUT_DIR").unwrap());
|
|
|
|
serde_codegen::expand("src/lib.in.rs", &out.join("lib.tmp0.rs")).unwrap();
|
|
protobuf_macros::expand(&out.join("lib.tmp0.rs"), &out.join("lib.rs")).unwrap();
|
|
}
|
|
|
|
#[cfg(not(feature = "with-syntex"))]
|
|
fn codegen() { }
|
|
|
|
fn main() {
|
|
vergen::vergen(vergen::OutputFns::all()).unwrap();
|
|
codegen();
|
|
}
|
|
|