wayland drm fixup

This commit is contained in:
Victoria Brekenfeld 2022-03-22 12:37:46 +01:00
parent 8e1c1af6a9
commit 2fb0fa8aef
3 changed files with 62 additions and 61 deletions

View file

@ -1,12 +1,8 @@
// SPDX-License-Identifier: GPL-3.0-only
extern crate wayland_scanner;
use wayland_scanner::{Side, generate_code};
use std::{
env,
process::Command,
path::PathBuf,
};
use std::{env, path::PathBuf, process::Command};
use wayland_scanner::{generate_code, Side};
fn main() {
if let Some(output) = Command::new("git")
@ -18,14 +14,9 @@ fn main() {
println!("cargo:rustc-env=GIT_HASH={}", git_hash);
}
let dest = PathBuf::from(&env::var("OUT_DIR").unwrap());
// Location of the xml file, relative to the `Cargo.toml`
let drm_protocol_file = "resources/wayland-drm.xml";
// Target directory for the generate files
generate_code(
drm_protocol_file,
&dest.join("wl_drm.rs"),
Side::Server,
);
generate_code(drm_protocol_file, &dest.join("wl_drm.rs"), Side::Server);
}