diff --git a/glutin-winit/build.rs b/glutin-winit/build.rs index 32078de541..c64860b7c5 100644 --- a/glutin-winit/build.rs +++ b/glutin-winit/build.rs @@ -23,4 +23,19 @@ fn main() { wgl_backend: { all(feature = "wgl", windows, not(wasm_platform)) }, cgl_backend: { all(macos_platform, not(wasm_platform)) }, } + + println!("cargo:rustc-check-cfg=cfg(android_platform)"); + println!("cargo:rustc-check-cfg=cfg(wasm_platform)"); + println!("cargo:rustc-check-cfg=cfg(macos_platform)"); + println!("cargo:rustc-check-cfg=cfg(ios_platform)"); + println!("cargo:rustc-check-cfg=cfg(apple)"); + println!("cargo:rustc-check-cfg=cfg(free_unix)"); + + println!("cargo:rustc-check-cfg=cfg(x11_platform)"); + println!("cargo:rustc-check-cfg=cfg(wayland_platform)"); + + println!("cargo:rustc-check-cfg=cfg(egl_backend)"); + println!("cargo:rustc-check-cfg=cfg(glx_backend)"); + println!("cargo:rustc-check-cfg=cfg(wgl_backend)"); + println!("cargo:rustc-check-cfg=cfg(cgl_backend)"); } diff --git a/glutin/build.rs b/glutin/build.rs index c8eab1b931..ceaa1e0a84 100644 --- a/glutin/build.rs +++ b/glutin/build.rs @@ -21,4 +21,19 @@ fn main() { wgl_backend: { all(feature = "wgl", windows, not(wasm_platform)) }, cgl_backend: { all(macos_platform, not(wasm_platform)) }, } + + println!("cargo:rustc-check-cfg=cfg(android_platform)"); + println!("cargo:rustc-check-cfg=cfg(wasm_platform)"); + println!("cargo:rustc-check-cfg=cfg(macos_platform)"); + println!("cargo:rustc-check-cfg=cfg(ios_platform)"); + println!("cargo:rustc-check-cfg=cfg(apple)"); + println!("cargo:rustc-check-cfg=cfg(free_unix)"); + + println!("cargo:rustc-check-cfg=cfg(x11_platform)"); + println!("cargo:rustc-check-cfg=cfg(wayland_platform)"); + + println!("cargo:rustc-check-cfg=cfg(egl_backend)"); + println!("cargo:rustc-check-cfg=cfg(glx_backend)"); + println!("cargo:rustc-check-cfg=cfg(wgl_backend)"); + println!("cargo:rustc-check-cfg=cfg(cgl_backend)"); } diff --git a/glutin_examples/build.rs b/glutin_examples/build.rs index 2fbd6cc476..c109f8ee73 100644 --- a/glutin_examples/build.rs +++ b/glutin_examples/build.rs @@ -29,6 +29,21 @@ fn main() { cgl_backend: { all(macos_platform, not(wasm_platform)) }, } + println!("cargo:rustc-check-cfg=cfg(android_platform)"); + println!("cargo:rustc-check-cfg=cfg(wasm_platform)"); + println!("cargo:rustc-check-cfg=cfg(macos_platform)"); + println!("cargo:rustc-check-cfg=cfg(ios_platform)"); + println!("cargo:rustc-check-cfg=cfg(apple)"); + println!("cargo:rustc-check-cfg=cfg(free_unix)"); + + println!("cargo:rustc-check-cfg=cfg(x11_platform)"); + println!("cargo:rustc-check-cfg=cfg(wayland_platform)"); + + println!("cargo:rustc-check-cfg=cfg(egl_backend)"); + println!("cargo:rustc-check-cfg=cfg(glx_backend)"); + println!("cargo:rustc-check-cfg=cfg(wgl_backend)"); + println!("cargo:rustc-check-cfg=cfg(cgl_backend)"); + let dest = PathBuf::from(&env::var("OUT_DIR").unwrap()); println!("cargo:rerun-if-changed=build.rs");