File: build.rs

package info (click to toggle)
rust-wayland-client-0.29 0.29.5-10
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 464 kB
  • sloc: xml: 2,530; makefile: 2
file content (20 lines) | stat: -rw-r--r-- 471 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
extern crate wayland_scanner;

use std::env::var;
use std::path::Path;
use wayland_scanner::*;

fn main() {
    let protocol_file = "./wayland.xml";

    let out_dir_str = var("OUT_DIR").unwrap();
    let out_dir = Path::new(&out_dir_str);

    println!("cargo:rerun-if-changed={}", protocol_file);
    generate_code_with_destructor_events(
        protocol_file,
        out_dir.join("wayland_api.rs"),
        Side::Client,
        &[("wl_callback", "done")],
    );
}