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