From 4b68280115c7a273d8431ccb0945ca8e20958134 Mon Sep 17 00:00:00 2001 From: Patrick von Reth Date: Wed, 20 Aug 2014 13:48:16 +0200 Subject: [PATCH] depend on ecm, drop kde stuff --- CMakeLists.txt | 19 +++++-------------- src/CMakeLists.txt | 4 ---- src/main.cpp | 16 ---------------- 3 files changed, 5 insertions(+), 34 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b0d6806..eaf9c48 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,7 +16,6 @@ option(WITH_FRONTENDS "Build frontends currently only useful if WITH_SNORE_DEAM option(WITH_GROWL_BACKEND "Build the Growl backend" ON) option(WITH_SNORE_DEAMON "Build the Snore deamon, which redirects notifications" OFF) option(WITH_QT4 "Use Qt4" ON) -option(WITH_KDE "Try to build with KDE support if available" ON) option(WITH_FREEDESKTOP_FRONTEND "Build the freedesktop frontend" OFF) ####################################################################### @@ -31,10 +30,12 @@ set(SNORE_CamelCase_SUFFIX "") if(WITH_QT4) find_package(Qt4 REQUIRED) include_directories( ${QT_INCLUDES} ) + include(NoKDE) else() - if(WITH_KDE) - find_package(ECM 0.0.9 NO_MODULE) - endif() + find_package(ECM 0.0.9 NO_MODULE REQUIRED) + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH}) + include(KDECompilerSettings) + find_package(Qt5Core REQUIRED) find_package(Qt5Widgets REQUIRED) find_package(Qt5Network REQUIRED) @@ -45,16 +46,6 @@ else() set(SNORE_CamelCase_SUFFIX "Qt5") endif() -if(NOT ECM_FOUND) - include(NoKDE) -else() - set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH}) - include(KDECompilerSettings) - add_definitions(-DHAVE_KDE5) - set(KDE5_FOUND TRUE) - find_package(KF5 REQUIRED COMPONENTS CoreAddons I18n) -endif() - find_package(Doxygen) if(DOXYGEN_FOUND) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e3d43f8..19bb9b3 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -7,10 +7,6 @@ if(WITH_SNORE_DEAMON) add_executable( snorenotify WIN32 main.cpp snorenotify.cpp trayicon.cpp ${SNORENOTIFY_DEAMON_DEPS}) target_link_libraries( snorenotify libsnore ${QT_QTGUI_LIBRARY} ) - if(KDE5_FOUND) - target_link_libraries( snorenotify KF5::CoreAddons KF5::I18n) - endif() - install(TARGETS snorenotify RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) diff --git a/src/main.cpp b/src/main.cpp index 16ca4e5..8cc1d28 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -5,15 +5,6 @@ #include - - -#ifdef HAVE_KDE5 -#include -#include -#endif - - - int main ( int argc, char *argv[] ) { QApplication app ( argc, argv ); @@ -21,13 +12,6 @@ int main ( int argc, char *argv[] ) app.setOrganizationName("SnoreNotify"); app.setApplicationVersion(Snore::Version::version()); -#ifdef HAVE_KDE5 - KAboutData about("SnoreNotify","SnoreNotify",Snore::Version::version(), - i18n("A notification deamon."),KAboutLicense::LGPL_V3, i18n("Copyright (c) 2010-2014 Patrick von Reth ")); - - KAboutData::setApplicationData(about); -#endif - SnoreNotify sn; return app.exec(); }