depend on ecm, drop kde stuff

This commit is contained in:
Patrick von Reth 2014-08-20 13:48:16 +02:00
parent 5c1bca6b85
commit 4b68280115
3 changed files with 5 additions and 34 deletions

View File

@ -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)

View File

@ -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)

View File

@ -5,15 +5,6 @@
#include <QApplication>
#ifdef HAVE_KDE5
#include <KAboutData>
#include <KI18n/KLocalizedString>
#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 <vonreth@kde.org>"));
KAboutData::setApplicationData(about);
#endif
SnoreNotify sn;
return app.exec();
}