Bump CMake version requirement to 2.8.9
[quassel.git] / CMakeLists.txt
index 3e4ee9c..a220522 100644 (file)
 # NOTE: You should remove CMakeCache.txt if you plan to change any of these values!
 
 
+cmake_minimum_required(VERSION 2.8.9)
 project(QuasselIRC)
 
 include(CheckFunctionExists)
 include(CheckIncludeFile)
 include(CheckCXXCompilerFlag)
 
-# For building against Qt5, we check for an even newer cmake version below!
-cmake_minimum_required(VERSION 2.8.1 FATAL_ERROR)
-
-if(COMMAND cmake_policy)
-   cmake_policy(SET CMP0003 NEW)
-endif(COMMAND cmake_policy)
-
 # Use our own (well, and KDE's) version of some modules
 # In particular cmake's own FindQt4 and FindOpenSSL are quite buggy
 set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
@@ -397,6 +391,13 @@ if(BUILD_GUI)
     else(WITH_PHONON)
       message(STATUS "Not enabling Phonon support")
     endif(WITH_PHONON)
+
+    find_package(Libsnore)
+    if(LIBSNORE_FOUND)
+        add_definitions(-DHAVE_LIBSNORE)
+        set(CLIENT_LIBRARIES ${CLIENT_LIBRARIES} ${LIBSNORE_LIBRARIES})
+        set(HAVE_SNORENOTIFY true)
+    endif(LIBSNORE_FOUND)
   endif(NOT HAVE_KDE)
 
   # Setup libindicate-qt support
@@ -425,13 +426,6 @@ if(BUILD_GUI)
       /System/Library/Frameworks/Foundation.framework
     )
   endif()
-
-find_package(Libsnore)
-if(LIBSNORE_FOUND)
-    add_definitions(-DHAVE_LIBSNORE -DLIBSNORE_PLUGIN_PATH="${LIBSNORE_PLUGIN_PATH}")
-    set(CLIENT_LIBRARIES ${CLIENT_LIBRARIES} ${LIBSNORE_LIBRARIES})
-    set(HAVE_SNORENOTIFY true)
-endif(LIBSNORE_FOUND)
 endif(BUILD_GUI)
 
 # Core-only deps