1 // Copyright (c) 2016 The vulkano developers 2 // Licensed under the Apache License, Version 2.0 3 // <LICENSE-APACHE or 4 // https://www.apache.org/licenses/LICENSE-2.0> or the MIT 5 // license <LICENSE-MIT or https://opensource.org/licenses/MIT>, 6 // at your option. All files in the project carrying such 7 // notice may not be copied, modified, or distributed except 8 // according to those terms. 9 10 use std::env; 11 12 mod autogen; 13 main()14fn main() { 15 let target = env::var("TARGET").unwrap(); 16 if target.contains("apple-ios") { 17 println!("cargo:rustc-link-search=framework=/Library/Frameworks/"); 18 println!("cargo:rustc-link-lib=c++"); 19 println!("cargo:rustc-link-lib=framework=MoltenVK"); 20 println!("cargo:rustc-link-lib=framework=Metal"); 21 println!("cargo:rustc-link-lib=framework=IOSurface"); 22 println!("cargo:rustc-link-lib=framework=QuartzCore"); 23 println!("cargo:rustc-link-lib=framework=UIKit"); 24 println!("cargo:rustc-link-lib=framework=Foundation"); 25 } 26 27 // Run autogen 28 println!("cargo:rerun-if-changed=vk.xml"); 29 autogen::autogen(); 30 } 31