initial work
This commit is contained in:
parent
1b39f34e02
commit
5371c96108
|
@ -14,5 +14,9 @@ shared_library = "0.1.5"
|
|||
lazy_static = "0.2.1"
|
||||
libc = "0.2.26"
|
||||
|
||||
[features]
|
||||
default = []
|
||||
moltenvk = []
|
||||
|
||||
[package.metadata.release]
|
||||
no-dev-version = true
|
||||
|
|
|
@ -15,7 +15,7 @@ fn get_path() -> &'static Path {
|
|||
Path::new("vulkan-1.dll")
|
||||
}
|
||||
|
||||
#[cfg(all(unix, not(target_os = "android")))]
|
||||
#[cfg(all(unix, not(any(feature = "moltenvk", target_os = "android"))))]
|
||||
fn get_path() -> &'static Path {
|
||||
Path::new("libvulkan.so.1")
|
||||
}
|
||||
|
@ -25,6 +25,11 @@ fn get_path() -> &'static Path {
|
|||
Path::new("libvulkan.so")
|
||||
}
|
||||
|
||||
#[cfg(all(feature = "moltenvk", any(target_os = "macos", target_os = "ios")))]
|
||||
fn get_path() -> &'static Path {
|
||||
Path::new("libMoltenVK.dylib")
|
||||
}
|
||||
|
||||
lazy_static!{
|
||||
static ref VK_LIB: Result<DynamicLibrary, String> = DynamicLibrary::open(Some(get_path()));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue