Skip to content

Commit

Permalink
Merge pull request #177 from newfla/fix_vulkan_macos
Browse files Browse the repository at this point in the history
fix: macos vulkan build script
  • Loading branch information
tazz4843 authored Oct 21, 2024
2 parents d8b6aef + d124152 commit d706878
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,17 @@ fn main() {
};
let vulkan_lib_path = vulkan_path.join("Lib");
println!("cargo:rustc-link-search={}", vulkan_lib_path.display());
} else if cfg!(target_os = "macos") {
println!("cargo:rerun-if-env-changed=VULKAN_SDK");
println!("cargo:rustc-link-lib=vulkan");
let vulkan_path = match env::var("VULKAN_SDK") {
Ok(path) => PathBuf::from(path),
Err(_) => panic!(
"Please install Vulkan SDK and ensure that VULKAN_SDK env variable is set"
),
};
let vulkan_lib_path = vulkan_path.join("lib");
println!("cargo:rustc-link-search={}", vulkan_lib_path.display());
} else {
println!("cargo:rustc-link-lib=vulkan");
}
Expand Down

0 comments on commit d706878

Please sign in to comment.