From 9b8c497cdbb24f5df20870a06d3044332bd78ce4 Mon Sep 17 00:00:00 2001 From: Patrick von Reth Date: Wed, 26 Mar 2014 21:16:01 +0100 Subject: [PATCH] Fixed detection of snore for Qt4/Qt5 --- CMakeLists.txt | 7 +++++++ cmake/FindLibsnore.cmake | 27 --------------------------- src/qtui/CMakeLists.txt | 2 +- 3 files changed, 8 insertions(+), 28 deletions(-) delete mode 100644 cmake/FindLibsnore.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 8be04113..26f967fd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -187,6 +187,13 @@ if(USE_QT5) 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) diff --git a/cmake/FindLibsnore.cmake b/cmake/FindLibsnore.cmake deleted file mode 100644 index 1af3944a..00000000 --- a/cmake/FindLibsnore.cmake +++ /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 - -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) diff --git a/src/qtui/CMakeLists.txt b/src/qtui/CMakeLists.txt index 86ec6158..84a08b98 100644 --- a/src/qtui/CMakeLists.txt +++ b/src/qtui/CMakeLists.txt @@ -89,7 +89,7 @@ if (KDE4_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) -- 2.20.1