82 lines
2.5 KiB
Rust
82 lines
2.5 KiB
Rust
use std::path::PathBuf;
|
|
|
|
fn main() {
|
|
let manifest_dir = PathBuf::from(std::env::var("CARGO_MANIFEST_DIR").expect("manifest dir"));
|
|
let workspace_dir = manifest_dir.parent().expect("workspace dir");
|
|
|
|
let server_uvc = workspace_dir
|
|
.join("server/src/bin/lesavka-uvc.rs")
|
|
.canonicalize()
|
|
.expect("canonical server uvc bin path");
|
|
let server_main = workspace_dir
|
|
.join("server/src/main.rs")
|
|
.canonicalize()
|
|
.expect("canonical server main path");
|
|
let server_video = workspace_dir
|
|
.join("server/src/video.rs")
|
|
.canonicalize()
|
|
.expect("canonical server video path");
|
|
let server_gadget = workspace_dir
|
|
.join("server/src/gadget.rs")
|
|
.canonicalize()
|
|
.expect("canonical server gadget path");
|
|
let client_main = workspace_dir
|
|
.join("client/src/main.rs")
|
|
.canonicalize()
|
|
.expect("canonical client main path");
|
|
let client_inputs = workspace_dir
|
|
.join("client/src/input/inputs.rs")
|
|
.canonicalize()
|
|
.expect("canonical client inputs path");
|
|
let client_keyboard = workspace_dir
|
|
.join("client/src/input/keyboard.rs")
|
|
.canonicalize()
|
|
.expect("canonical client keyboard path");
|
|
let client_mouse = workspace_dir
|
|
.join("client/src/input/mouse.rs")
|
|
.canonicalize()
|
|
.expect("canonical client mouse path");
|
|
let common_cli = workspace_dir
|
|
.join("common/src/bin/cli.rs")
|
|
.canonicalize()
|
|
.expect("canonical common cli bin path");
|
|
|
|
|
|
println!(
|
|
"cargo:rustc-env=LESAVKA_SERVER_UVC_BIN_SRC={}",
|
|
server_uvc.display()
|
|
);
|
|
println!(
|
|
"cargo:rustc-env=LESAVKA_SERVER_MAIN_SRC={}",
|
|
server_main.display()
|
|
);
|
|
println!(
|
|
"cargo:rustc-env=LESAVKA_SERVER_VIDEO_SRC={}",
|
|
server_video.display()
|
|
);
|
|
println!(
|
|
"cargo:rustc-env=LESAVKA_SERVER_GADGET_SRC={}",
|
|
server_gadget.display()
|
|
);
|
|
println!(
|
|
"cargo:rustc-env=LESAVKA_CLIENT_MAIN_SRC={}",
|
|
client_main.display()
|
|
);
|
|
println!(
|
|
"cargo:rustc-env=LESAVKA_CLIENT_INPUTS_SRC={}",
|
|
client_inputs.display()
|
|
);
|
|
println!(
|
|
"cargo:rustc-env=LESAVKA_CLIENT_KEYBOARD_SRC={}",
|
|
client_keyboard.display()
|
|
);
|
|
println!(
|
|
"cargo:rustc-env=LESAVKA_CLIENT_MOUSE_SRC={}",
|
|
client_mouse.display()
|
|
);
|
|
println!(
|
|
"cargo:rustc-env=LESAVKA_COMMON_CLI_BIN_SRC={}",
|
|
common_cli.display()
|
|
);
|
|
}
|