2022-11-26 23:57:50 +00:00
|
|
|
// Copyright 2020 The Jujutsu Authors
|
2020-12-24 07:12:18 +00:00
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License.
|
|
|
|
// You may obtain a copy of the License at
|
|
|
|
//
|
|
|
|
// https://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let input = &[
|
2022-05-03 23:34:28 +00:00
|
|
|
"src/protos/op_store.proto",
|
|
|
|
"src/protos/store.proto",
|
|
|
|
"src/protos/working_copy.proto",
|
2020-12-24 07:12:18 +00:00
|
|
|
];
|
2022-05-02 15:53:50 +00:00
|
|
|
protobuf_codegen::Codegen::new()
|
|
|
|
.pure()
|
2020-12-24 07:12:18 +00:00
|
|
|
.inputs(input)
|
2022-05-03 23:34:28 +00:00
|
|
|
.include("src/protos")
|
2022-05-02 15:53:50 +00:00
|
|
|
.cargo_out_dir("protos")
|
2022-05-04 04:02:22 +00:00
|
|
|
.run_from_script();
|
2020-12-24 07:12:18 +00:00
|
|
|
println!("cargo:rerun-if-changed=build.rs");
|
|
|
|
for file in input {
|
2022-12-15 02:30:06 +00:00
|
|
|
println!("cargo:rerun-if-changed={file}");
|
2020-12-24 07:12:18 +00:00
|
|
|
}
|
2022-02-21 06:14:13 +00:00
|
|
|
|
|
|
|
if let Some(true) = version_check::supports_feature("map_first_last") {
|
|
|
|
println!("cargo:rustc-cfg=feature=\"map_first_last\"");
|
|
|
|
}
|
2020-12-24 07:12:18 +00:00
|
|
|
}
|