-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.rs
27 lines (24 loc) · 865 Bytes
/
build.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Compile the protobuf headers for WidevinePsshData
use std::io::Result;
fn main() -> Result<()> {
#[cfg(feature = "vendored-protoc")]
std::env::set_var("PROTOC", protobuf_src::protoc());
let mut config = prost_build::Config::new();
// We want to provide our own Debug fmt implementation for this type
config.skip_debug(["WidevinePsshData"])
.type_attribute(".", "#[derive(serde::Serialize, serde::Deserialize)]")
.extern_path(
".google.protobuf.Any",
"::prost_wkt_types::Any"
)
.extern_path(
".google.protobuf.Timestamp",
"::prost_wkt_types::Timestamp"
)
.extern_path(
".google.protobuf.Value",
"::prost_wkt_types::Value"
)
.compile_protos(&["src/widevine_pssh_data.proto"], &["src/"])?;
Ok(())
}