From 4c2e0f889f71960d2bcdc69dcc52e89c72673503 Mon Sep 17 00:00:00 2001 From: Drakulix Date: Sat, 18 Mar 2017 17:26:22 +0100 Subject: [PATCH] Update features --- Cargo.toml | 6 ++++-- src/backend/mod.rs | 6 +++--- src/lib.rs | 5 ++++- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 6c735f8..e5adedd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Victor Berger "] [dependencies] -wayland-server = { version = "0.8.6", features = ["dlopen"] } +wayland-server = "0.8.6" nix = "0.7.0" glutin = { version = "~0.7.4", optional = true } glium = { version = "~0.16.0", optional = true } @@ -16,4 +16,6 @@ clippy = { version = "*", optional = true } slog-term = "~1.5" [features] -default = ["glutin"] +default = ["backend_glutin", "renderer_glium"] +backend_glutin = ["glutin", "wayland-server/dlopen"] +renderer_glium = ["glium"] diff --git a/src/backend/mod.rs b/src/backend/mod.rs index 1793dde..6047505 100644 --- a/src/backend/mod.rs +++ b/src/backend/mod.rs @@ -15,12 +15,12 @@ pub mod input; pub mod graphics; -#[cfg(feature = "glutin")] +#[cfg(feature = "backend_glutin")] pub mod glutin; -#[cfg(feature = "glium")] +#[cfg(feature = "renderer_glium")] mod glium; -#[cfg(feature = "glium")] +#[cfg(feature = "renderer_glium")] pub use glium::*; trait NewIdType { diff --git a/src/lib.rs b/src/lib.rs index 1bb9ed5..56498d3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -7,9 +7,12 @@ extern crate wayland_server; extern crate nix; -#[cfg(feature = "glutin")] +#[cfg(feature = "backend_glutin")] extern crate glutin; +#[cfg(feature = "renderer_glium")] +extern crate glium; + #[macro_use] extern crate slog; extern crate slog_stdlog;