mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-26 00:34:19 +00:00
Merge pull request #597 from nicokoch/macos-fixes
Fix build warnings on macos
This commit is contained in:
commit
c24e67365f
@ -12,8 +12,6 @@ use std::env;
|
||||
fn main() {
|
||||
let target = env::var("TARGET").unwrap();
|
||||
if target.contains("apple-darwin") {
|
||||
println!("cargo:rustc-link-search=framework={}",
|
||||
"/Library/Frameworks"); // TODO: necessary?
|
||||
println!("cargo:rustc-link-lib=c++");
|
||||
println!("cargo:rustc-link-lib=framework=MoltenVK");
|
||||
println!("cargo:rustc-link-lib=framework=QuartzCore");
|
||||
|
@ -10,13 +10,11 @@
|
||||
use std::error;
|
||||
use std::fmt;
|
||||
use std::mem;
|
||||
use std::path::Path;
|
||||
use std::ptr;
|
||||
|
||||
use shared_library;
|
||||
use vk;
|
||||
|
||||
#[cfg(any(target_os = "macos", target_os = "ios"))]
|
||||
#[allow(non_snake_case)]
|
||||
fn load_static() -> Result<vk::Static, LoadingError> {
|
||||
use std::os::raw::c_char;
|
||||
|
||||
@ -35,6 +33,9 @@ fn load_static() -> Result<vk::Static, LoadingError> {
|
||||
|
||||
#[cfg(not(any(target_os = "macos", target_os = "ios")))]
|
||||
fn load_static() -> Result<vk::Static, LoadingError> {
|
||||
use std::path::Path;
|
||||
use std::ptr;
|
||||
use shared_library;
|
||||
lazy_static! {
|
||||
static ref VK_LIB: Result<shared_library::dynamic_library::DynamicLibrary, LoadingError> = {
|
||||
#[cfg(windows)] fn get_path() -> &'static Path { Path::new("vulkan-1.dll") }
|
||||
|
Loading…
Reference in New Issue
Block a user