diff options
Diffstat (limited to 'spirv_tools-sys/build.rs')
-rw-r--r-- | spirv_tools-sys/build.rs | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/spirv_tools-sys/build.rs b/spirv_tools-sys/build.rs deleted file mode 100644 index ae72561..0000000 --- a/spirv_tools-sys/build.rs +++ /dev/null @@ -1,28 +0,0 @@ -extern crate cmake;
-
-use cmake::Config;
-use std::{env::VarError, path::PathBuf};
-
-fn main() -> Result<(), VarError> {
- let root_path = std::env::var("CARGO_MANIFEST_DIR")?;
- let mut headers_path = PathBuf::new();
- headers_path.push(root_path);
- headers_path.push("../ext/spirv-headers");
- let spirv_tools_dir = Config::new("../ext/spirv-tools")
- .always_configure(false)
- .define("SPIRV-Headers_SOURCE_DIR", headers_path)
- .define("SPIRV_SKIP_EXECUTABLES", "ON")
- .define("SPIRV_SKIP_TESTS", "ON")
- .build();
- println!(
- "cargo:rustc-link-search=native={}/bin",
- spirv_tools_dir.display()
- );
- println!(
- "cargo:rustc-link-search=native={}/lib",
- spirv_tools_dir.display()
- );
- // dynamic linking to avoid linking to C++ runtime
- println!("cargo:rustc-link-lib=dylib=SPIRV-Tools-shared");
- Ok(())
-}
|