mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-25 16:25:31 +00:00
7a3434efd1
VulkanSDK: 1.1.77.0 Date: 20-Jun-2018 SHA256: 41631380388244fa88209beac748553705087ed7df375c08456a82e0769bd0c4 https://vulkan.lunarg.com/sdk/home#sdk/downloadConfirm/1.1.77.0/windows/VulkanSDK-1.1.77.0-Installer.exe sha256sum VulkanSDK/1.1.77.0/Bin/glslangValidator.exe 90b377479fb137f4ac69460d5f5cdc54cd23bace5eb6e6812516fdfa693b25cf *VulkanSDK/1.1.77.0/Bin/glslangValidator.exe glslangValidator.exe --version Glslang Version: 7.7.2767 ESSL Version: OpenGL ES GLSL 3.20 glslang Khronos. 7.2767 GLSL Version: 4.60 glslang Khronos. 7.2767 SPIR-V Version 0x00010300, Revision 1 GLSL.std.450 Version 100, Revision 1 Khronos Tool ID 8 SPIR-V Generator Version 7 GL_KHR_vulkan_glsl version 100 ARB_GL_gl_spirv version 100
45 lines
1.4 KiB
Rust
45 lines
1.4 KiB
Rust
extern crate cmake;
|
|
extern crate sha2;
|
|
|
|
use std::env;
|
|
use std::fs;
|
|
use std::path::Path;
|
|
use std::process::Command;
|
|
|
|
use sha2::{Sha256, Digest};
|
|
|
|
fn main() {
|
|
println!("cargo:rerun-if-changed=build/glslangValidator.exe");
|
|
|
|
let target = env::var("TARGET").unwrap();
|
|
let out_file = Path::new(&env::var("OUT_DIR").unwrap()).join("glslang_validator");
|
|
|
|
let path = if target.contains("windows") {
|
|
const SHA256SUM: &'static str =
|
|
"90b377479fb137f4ac69460d5f5cdc54cd23bace5eb6e6812516fdfa693b25cf";
|
|
let path = Path::new("build/glslangValidator.exe").to_owned();
|
|
let content = fs::read(&path).expect("failed to open executable");
|
|
let mut hasher = Sha256::default();
|
|
hasher.input(&content);
|
|
let result = hasher.result();
|
|
let sha256sum = format!("{:x}", result);
|
|
assert_eq!(sha256sum, SHA256SUM, "glslangValidator.exe checksum failed");
|
|
path
|
|
|
|
} else {
|
|
// Try to initialize submodules. Don't care if it fails, since this code also runs for
|
|
// the crates.io package.
|
|
let _ = Command::new("git")
|
|
.arg("submodule")
|
|
.arg("update")
|
|
.arg("--init")
|
|
.status();
|
|
cmake::build("glslang");
|
|
Path::new(&env::var("OUT_DIR").unwrap())
|
|
.join("bin")
|
|
.join("glslangValidator")
|
|
};
|
|
|
|
fs::copy(&path, &out_file).expect("failed to copy executable");
|
|
}
|