mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-17 07:44:40 +00:00
13 lines
542 B
Rust
13 lines
542 B
Rust
//! Sets `no_dwg_bridge` on the targets built without acadrust (see Cargo.toml): the DWG functions
|
|
//! there return an error that says to use DXF.
|
|
|
|
fn main() {
|
|
println!("cargo:rerun-if-changed=build.rs");
|
|
println!("cargo::rustc-check-cfg=cfg(no_dwg_bridge)");
|
|
let arch = std::env::var("CARGO_CFG_TARGET_ARCH").unwrap_or_default();
|
|
let os = std::env::var("CARGO_CFG_TARGET_OS").unwrap_or_default();
|
|
if arch == "wasm32" || (os == "freebsd" && arch == "aarch64") {
|
|
println!("cargo::rustc-cfg=no_dwg_bridge");
|
|
}
|
|
}
|