Make Ayatana notifications optional
authorManuel Nickschas <sputnick@quassel-irc.org>
Tue, 15 Sep 2009 08:57:10 +0000 (10:57 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Tue, 15 Sep 2009 08:57:10 +0000 (10:57 +0200)
-DWITH_LIBINDICATE=(ON|OFF) tells cmake to (not) check for libindicate-qt.
Default is ON.

CMakeLists.txt
INSTALL

index 5dd553c..ba4dab8 100644 (file)
@@ -7,6 +7,7 @@
 # -DWITH_DBUS=OFF        : Disable D-Bus support (dbus notifications)
 # -DWITH_WEBKIT=OFF      : Disable WebKit support (link previews)
 # -DWITH_PHONON=OFF      : Disable Phonon support (audio notifications)
+# -DWITH_LIBINDICATE=OFF : Disable libindicate support (Ayatana notifications)
 # -DWITH_KDE=ON          : Enable KDE4 support
 # -DWITH_OXYGEN=(ON|OFF) : Whether to install Oxygen icons (default: yes, unless KDE > 4.3.0 is present and enabled)
 #
@@ -40,6 +41,7 @@ option(WITH_OPENSSL  "Enable OpenSSL support if present on the system"        ON)
 option(WITH_DBUS     "Enable D-Bus support if present on the system"   ON)
 option(WITH_WEBKIT   "Enable WebKit support (for link previews)"       ON)
 option(WITH_PHONON   "Enable Phonon support (for audio notifications)" ON)
+option(WITH_LIBINDICATE "Enable Ayatana notification support"           ON)
 option(WITH_KDE      "Enable KDE4 integration"                         OFF)
 
 # We use icon paths from KDE 4.3.x, which are partially invalid on older and possibly
@@ -232,13 +234,15 @@ if(NOT HAVE_KDE)
 endif(NOT HAVE_KDE)
 
 # Setup libindicate-qt support
-find_package(PkgConfig QUIET)
-if(PKG_CONFIG_FOUND)
-  pkg_check_modules(INDICATEQT indicate-qt)
-  if(INDICATEQT_FOUND)
-    add_definitions(-DHAVE_INDICATEQT)
-  endif(INDICATEQT_FOUND)
-endif(PKG_CONFIG_FOUND)
+if(WITH_LIBINDICATE)
+  find_package(PkgConfig QUIET)
+  if(PKG_CONFIG_FOUND)
+    pkg_check_modules(INDICATEQT indicate-qt)
+    if(INDICATEQT_FOUND)
+      add_definitions(-DHAVE_INDICATEQT)
+    endif(INDICATEQT_FOUND)
+  endif(PKG_CONFIG_FOUND)
+endif(WITH_LIBINDICATE)
 
 # Now set up install locations; those are set by KDE if integration is enabled
 if(NOT HAVE_KDE)
diff --git a/INSTALL b/INSTALL
index a255e4b..94e2000 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -60,6 +60,9 @@ Quassel recognizes the following options:
 -DWITH_PHONON=OFF
     Disable support for audio notifications via Phonon.
 
+-DWITH_LIBINDICATE=OFF
+    Disable support for Ayatana notifications (libindicate-qt)
+
 -DLINGUAS="<languages">
     Allow to choose which languages should be compiled into the binary.
     <languages> is a space- or comma-separated list of language codes.