From d35f0c9ee105f8c789827d6f5c740154f7b9b1bc Mon Sep 17 00:00:00 2001 From: Minijackson Date: Mon, 8 Oct 2018 15:41:46 +0200 Subject: Use features to separate pa_eq and pa_effects + slightly better logging --- src/main.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index a23034e..df1732d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,3 @@ -extern crate dbus; - #[macro_use] extern crate log; #[macro_use] @@ -14,15 +12,20 @@ extern crate structopt; extern crate lalrpop_util; +#[cfg(feature = "pa-eq")] +extern crate dbus; + +#[cfg(feature = "pa-effects")] #[macro_use] extern crate serde_json; mod cli; -mod dbus_api; mod parsing; mod utils; +#[cfg(feature = "pa-eq")] mod pa_eq; +#[cfg(feature = "pa-effects")] mod pa_effects; use cli::*; @@ -75,7 +78,9 @@ fn start() -> Result<(), Error> { use Command::*; match args.cmd { + #[cfg(feature = "pa-eq")] PaEq(args) => pa_eq::main(args), + #[cfg(feature = "pa-effects")] PaEffects(args) => pa_effects::main(args), } } -- cgit v1.2.3