Merge pull request #2924 from 4JX/master
hbb_common: Use OUT_DIR in build.rs
This commit is contained in:
		
						commit
						a60f1823e8
					
				
							
								
								
									
										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…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user