diff options
author | gennyble <gen@nyble.dev> | 2023-09-10 02:44:01 -0500 |
---|---|---|
committer | gennyble <gen@nyble.dev> | 2023-09-10 02:44:01 -0500 |
commit | a962ba9c853a797e9a41b2830ec0181b167d8cd9 (patch) | |
tree | 7de53dfcaf87c5d4b43f2e8b38161eb193c136ad /lri-proto/build.rs | |
parent | 70187683361d97a8b5a251567323c323c90302f2 (diff) | |
download | lri-rs-a962ba9c853a797e9a41b2830ec0181b167d8cd9.tar.gz lri-rs-a962ba9c853a797e9a41b2830ec0181b167d8cd9.zip |
reorg
Diffstat (limited to 'lri-proto/build.rs')
-rw-r--r-- | lri-proto/build.rs | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/lri-proto/build.rs b/lri-proto/build.rs new file mode 100644 index 0000000..31aee5a --- /dev/null +++ b/lri-proto/build.rs @@ -0,0 +1,50 @@ +use std::fs; + +use protobuf_codegen::Customize; +use std::path::Path; + +fn main() { + let proto_dir = "src/proto"; + + if Path::new(&proto_dir).exists() { + fs::remove_dir_all(&proto_dir).unwrap(); + } + fs::create_dir(&proto_dir).unwrap(); + + protobuf_codegen::Codegen::new() + .pure() + .customize(Customize::default().gen_mod_rs(true).lite_runtime(true)) + .out_dir(proto_dir) + .input("proto/camera_id.proto") + .input("proto/camera_module.proto") + .input("proto/color_calibration.proto") + .input("proto/dead_pixel_map.proto") + .input("proto/device_temp.proto") + .input("proto/distortion.proto") + .input("proto/face_data.proto") + .input("proto/flash_calibration.proto") + .input("proto/geometric_calibration.proto") + .input("proto/gps_data.proto") + .input("proto/hot_pixel_map.proto") + .input("proto/hw_info.proto") + .input("proto/imu_data.proto") + .input("proto/lightheader.proto") + .input("proto/matrix3x3f.proto") + .input("proto/matrix4x4f.proto") + .input("proto/mirror_system.proto") + .input("proto/point2f.proto") + .input("proto/point2i.proto") + .input("proto/point3f.proto") + .input("proto/proximity_sensors.proto") + .input("proto/range2f.proto") + .input("proto/rectanglei.proto") + .input("proto/sensor_characterization.proto") + .input("proto/sensor_type.proto") + .input("proto/time_stamp.proto") + .input("proto/tof_calibration.proto") + .input("proto/view_preferences.proto") + .input("proto/vignetting_characterization.proto") + .include("proto") + .run() + .unwrap(); +} |