Fixed detection of snore for Qt4/Qt5 66/head
authorPatrick von Reth <vonreth@kde.org>
Wed, 26 Mar 2014 20:16:01 +0000 (21:16 +0100)
committerPatrick von Reth <vonreth@kde.org>
Wed, 26 Mar 2014 20:16:01 +0000 (21:16 +0100)
CMakeLists.txt
cmake/FindLibsnore.cmake [deleted file]
src/qtui/CMakeLists.txt

index 8be0411..26f967f 100644 (file)
@@ -187,6 +187,13 @@ if(USE_QT5)
             DESCRIPTION "a multimedia abstraction library"
             PURPOSE     "Required for audio notifications"
         )
             DESCRIPTION "a multimedia abstraction library"
             PURPOSE     "Required for audio notifications"
         )
+        
+        find_package(LibsnoreQt5 QUIET)
+        set_package_properties(LibsnoreQt5 PROPERTIES TYPE OPTIONAL
+            URL "https://github.com/TheOneRing/Snorenotify"
+            DESCRIPTION "a cross-platform notification framework"
+            PURPOSE     "Enable support for the snorenotify framework"
+        )
 
         if (WITH_WEBKIT)
             find_package(Qt5WebKit QUIET)
 
         if (WITH_WEBKIT)
             find_package(Qt5WebKit QUIET)
diff --git a/cmake/FindLibsnore.cmake b/cmake/FindLibsnore.cmake
deleted file mode 100644 (file)
index 1af3944..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-# - Try to find the libsnore library
-#  Once done this will define
-#
-#  LIBSNORE_FOUND - system has the LIBSNORE library
-#  LIBSNORE_LIBRARIES - The libraries needed to use LIBSNORE
-#  LIBSNORE_INCLUDE_DIRS - The includes needed to use LIBSNORE
-#  Copyright 2013-2014 Patrick von Reth <vonreth@kde.org>
-
-find_path(LIBSNORE_INCLUDE_DIR
-  NAMES snore/core/snore.h
-  PATHS ${KDE4_INCLUDE_DIR}
-)
-
-find_library(LIBSNORE_LIBRARY
-  NAMES
-  libsnore
-  snore
-  PATHS ${KDE4_LIB_DIR}
-)
-
-set(LIBSNORE_LIBRARIES ${LIBSNORE_LIBRARY})
-set(LIBSNORE_INCLUDE_DIRS ${LIBSNORE_INCLUDE_DIR})
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(LIBSNORE DEFAULT_MSG LIBSNORE_LIBRARIES LIBSNORE_INCLUDE_DIRS)
-
-mark_as_advanced(LIBSNORE_LIBRARIES LIBSNORE_INCLUDE_DIRS)
index 86ec615..84a08b9 100644 (file)
@@ -89,7 +89,7 @@ if (KDE4_FOUND)
 endif()
 
 if (LIBSNORE_FOUND)
 endif()
 
 if (LIBSNORE_FOUND)
-    add_definitions(-DHAVE_SNORENOTIFY)
+    add_definitions(-DHAVE_LIBSNORE)
     include_directories(${LIBSNORE_INCLUDE_DIRS})
     list(APPEND SOURCES snorenotificationbackend.cpp)
     list(APPEND FORMS   snorentificationconfigwidget.ui)
     include_directories(${LIBSNORE_INCLUDE_DIRS})
     list(APPEND SOURCES snorenotificationbackend.cpp)
     list(APPEND FORMS   snorentificationconfigwidget.ui)