From 10e74e29485e9dea6482cba0e29fa0372db6fbc8 Mon Sep 17 00:00:00 2001 From: Victor Brekenfeld Date: Thu, 22 Nov 2018 10:14:23 +0100 Subject: [PATCH] build: fix build without gl-features --- build.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build.rs b/build.rs index b119e11..9ae8ecb 100644 --- a/build.rs +++ b/build.rs @@ -1,8 +1,11 @@ +#[cfg(any(feature = "backend_egl", feature = "backend_gl"))] extern crate gl_generator; +#[cfg(any(feature = "backend_egl", feature = "backend_gl"))] use gl_generator::{Api, Fallbacks, Profile, Registry}; use std::{env, fs::File, path::PathBuf}; +#[cfg(any(feature = "backend_egl", feature = "backend_gl"))] fn main() { let dest = PathBuf::from(&env::var("OUT_DIR").unwrap()); @@ -46,3 +49,6 @@ fn main() { .unwrap(); } } + +#[cfg(not(any(feature = "backend_egl", feature = "backend_gl")))] +fn main() {} \ No newline at end of file