fixed cmake for linux
This commit is contained in:
parent
f5258c7337
commit
ceb1eff0ae
|
@ -1,20 +1,22 @@
|
|||
project( SnoreNotify )
|
||||
cmake_minimum_required( VERSION 2.8.9 )
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake/modules ${CMAKE_PREFIX_PATH}/share/apps/cmake/modules)
|
||||
cmake_minimum_required( VERSION 2.8.12 )
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
find_package(ECM 1.2.0 REQUIRED NO_MODULE)
|
||||
|
||||
cmake_policy(SET CMP0020 NEW)
|
||||
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules )
|
||||
|
||||
include(KDEInstallDirs)
|
||||
include(KDECompilerSettings)
|
||||
include(KDECMakeSettings)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
include(GenerateExportHeader)
|
||||
include(FeatureSummary)
|
||||
|
||||
|
||||
|
||||
#######################################################################
|
||||
option(WITH_FRONTENDS "Build frontends currently only useful if WITH_SNORE_DEAMON=ON" OFF)
|
||||
option(WITH_SNORE_DEAMON "Build the Snore deamon, which redirects notifications" OFF)
|
||||
option(WITH_QT4 "Use Qt4" ON)
|
||||
option(WITH_FREEDESKTOP_FRONTEND "Build the freedesktop frontend" OFF)
|
||||
#######################################################################
|
||||
|
||||
|
@ -26,9 +28,6 @@ set(SNORE_VERSION_SUFFIX "")
|
|||
set(SNORE_SUFFIX "-qt5")
|
||||
set(SNORE_CamelCase_SUFFIX "Qt5")
|
||||
|
||||
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)
|
||||
|
@ -36,8 +35,6 @@ find_package(Qt5Network REQUIRED)
|
|||
find_package(Qt5Quick REQUIRED)
|
||||
|
||||
|
||||
|
||||
|
||||
find_package(Doxygen QUIET)
|
||||
set_package_properties(Doxygen PROPERTIES
|
||||
DESCRIPTION "Doxygen a tool for generating documentation."
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
if(UNIX AND WITH_SNORE_DEAMON)
|
||||
if(UNIX AND WITH_SNORE_DEAMON)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/snorenotify.desktop.in" "${CMAKE_CURRENT_BINARY_DIR}/snorenotify.desktop" @ONLY)
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/snorenotify.desktop" DESTINATION ${XDG_APPS_INSTALL_DIR})
|
||||
endif(UNIX AND WITH_SNORE_DEAMON)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
add_subdirectory(snoretoast)
|
||||
endif(WIN32)
|
||||
endif()
|
||||
|
|
|
@ -1,14 +1,10 @@
|
|||
if(NOT WITH_FREEDESKTOP_FRONTEND AND UNIX AND NOT APPLE)
|
||||
|
||||
if(NOT WITH_QT4)
|
||||
find_package(Qt5DBus QUIET)
|
||||
set_package_properties(Qt5DBus PROPERTIES
|
||||
PURPOSE "Support for Freedesktop Notifications"
|
||||
TYPE OPTIONAL)
|
||||
set(QT_QTDBUS_FOUND TRUE)
|
||||
set(QT_QTDBUS_LIBRARY Qt5::DBus)
|
||||
endif()
|
||||
|
||||
find_package(Qt5DBus QUIET)
|
||||
set_package_properties(Qt5DBus PROPERTIES
|
||||
PURPOSE "Support for Freedesktop Notifications"
|
||||
TYPE OPTIONAL)
|
||||
set(QT_QTDBUS_FOUND TRUE)
|
||||
set(QT_QTDBUS_LIBRARY Qt5::DBus)
|
||||
|
||||
if(QT_QTDBUS_FOUND)
|
||||
message(STATUS "Adding Freedesktop notification backend")
|
||||
|
@ -18,7 +14,7 @@ if(NOT WITH_FREEDESKTOP_FRONTEND AND UNIX AND NOT APPLE)
|
|||
fredesktopnotification.cpp
|
||||
)
|
||||
|
||||
qt4_add_dbus_interface( FREEDESKTOP_NOTIFICATION_SRC ../../frontends/freedesktop/org.freedesktop.Notifications.xml notificationinterface )
|
||||
qt5_add_dbus_interface( FREEDESKTOP_NOTIFICATION_SRC ../../frontends/freedesktop/org.freedesktop.Notifications.xml notificationinterface )
|
||||
|
||||
|
||||
add_library(libsnore_backend_freedesktop MODULE ${FREEDESKTOP_NOTIFICATION_SRC} )
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
#include <QDesktopWidget>
|
||||
#include <QDesktopServices>
|
||||
#include <QPicture>
|
||||
#include <QtDeclarative/QDeclarativeView>
|
||||
#include <QLayout>
|
||||
#include <QSize>
|
||||
using namespace Snore;
|
||||
|
|
Loading…
Reference in New Issue