From 4a23fce218313a4b6085fe0206582490263a0a9f Mon Sep 17 00:00:00 2001 From: Nicolas Koch Date: Wed, 5 Jul 2017 11:50:41 +0200 Subject: [PATCH] Fix build warnings on macos --- vulkano/build.rs | 2 -- vulkano/src/instance/loader.rs | 7 ++++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/vulkano/build.rs b/vulkano/build.rs index e61beab5..9ba28bdc 100644 --- a/vulkano/build.rs +++ b/vulkano/build.rs @@ -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"); diff --git a/vulkano/src/instance/loader.rs b/vulkano/src/instance/loader.rs index fe690362..1c1cc2ee 100644 --- a/vulkano/src/instance/loader.rs +++ b/vulkano/src/instance/loader.rs @@ -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 { use std::os::raw::c_char; @@ -35,6 +33,9 @@ fn load_static() -> Result { #[cfg(not(any(target_os = "macos", target_os = "ios")))] fn load_static() -> Result { + use std::path::Path; + use std::ptr; + use shared_library; lazy_static! { static ref VK_LIB: Result = { #[cfg(windows)] fn get_path() -> &'static Path { Path::new("vulkan-1.dll") }