mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-11-23 19:49:05 +08:00
Use OUT_DIR in build.rs
This commit is contained in:
parent
efa7b52f49
commit
f591f5686c
1
libs/hbb_common/.gitignore
vendored
1
libs/hbb_common/.gitignore
vendored
@ -1,4 +1,3 @@
|
||||
/target
|
||||
**/*.rs.bk
|
||||
Cargo.lock
|
||||
src/protos/
|
||||
|
@ -1,8 +1,11 @@
|
||||
fn main() {
|
||||
std::fs::create_dir_all("src/protos").unwrap();
|
||||
let out_dir = format!("{}/protos", std::env::var("OUT_DIR").unwrap());
|
||||
|
||||
std::fs::create_dir_all(&out_dir).unwrap();
|
||||
|
||||
protobuf_codegen::Codegen::new()
|
||||
.pure()
|
||||
.out_dir("src/protos")
|
||||
.out_dir(out_dir)
|
||||
.inputs(&["protos/rendezvous.proto", "protos/message.proto"])
|
||||
.include("protos")
|
||||
.customize(
|
||||
|
1
libs/hbb_common/src/protos/mod.rs
Normal file
1
libs/hbb_common/src/protos/mod.rs
Normal file
@ -0,0 +1 @@
|
||||
include!(concat!(env!("OUT_DIR"), "/protos/mod.rs"));
|
Loading…
Reference in New Issue
Block a user