Files
DS4Server/build.rs

19 lines
515 B
Rust

use std::path::Path;
fn main() {
if std::env::var("CARGO_CFG_TARGET_OS").as_deref() != Ok("macos") {
return;
}
let metal = Path::new("native/metal/ds4_metal.m");
println!("cargo:rerun-if-changed={}", metal.display());
cc::Build::new()
.include("native/metal")
.file(metal)
.flag("-fobjc-arc")
.opt_level(3)
.compile("ds4_metal");
println!("cargo:rustc-link-lib=framework=Foundation");
println!("cargo:rustc-link-lib=framework=Metal");
}