build.rs (1144B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 fn main() { 6 // HACK - This build script relies on Gecko having been built, so that the ANGLE libraries 7 // have already been compiled. It also assumes they are being built with an in-tree 8 // x86_64 object directory. 9 10 cc::Build::new() 11 .file("src/lib.cpp") 12 .include("../../../angle/checkout/include") 13 .compile("windows"); 14 15 // Set up linker paths for ANGLE that is built by Gecko 16 println!("cargo:rustc-link-search=../../obj-x86_64-pc-windows-msvc/gfx/angle/targets/libEGL"); 17 println!("cargo:rustc-link-search=../../obj-x86_64-pc-windows-msvc/gfx/angle/targets/libGLESv2"); 18 19 // Link to libEGL and libGLESv2 (ANGLE) and D3D11 + DirectComposition 20 println!("cargo:rustc-link-lib=libEGL"); 21 println!("cargo:rustc-link-lib=libGLESv2"); 22 println!("cargo:rustc-link-lib=dcomp"); 23 println!("cargo:rustc-link-lib=d3d11"); 24 println!("cargo:rustc-link-lib=dwmapi"); 25 }