make pushover frontend optional depending on Qt5WebSockets

This commit is contained in:
Patrick von Reth 2015-06-29 15:33:42 +02:00
parent 906a79cea8
commit 0433f38f37
3 changed files with 15 additions and 10 deletions

View File

@ -1,10 +1,9 @@
if(NOT WITH_FREEDESKTOP_FRONTEND AND UNIX AND NOT APPLE)
find_package(Qt5DBus QUIET)
set_package_properties(Qt5DBus PROPERTIES
PURPOSE "Support for Freedesktop Notifications"
PURPOSE "Support for the Freedesktop Notification Backend."
TYPE OPTIONAL)
if(Qt5DBus_FOUND)
message(STATUS "Adding Freedesktop notification backend")
set ( FREEDESKTOP_NOTIFICATION_SRC
freedesktopnotification_backend.cpp

View File

@ -1,7 +1,7 @@
if(WIN32 OR APPLE)
find_package(Qt5DBus QUIET)
set_package_properties(Qt5DBus PROPERTIES
PURPOSE "Support for Freedesktop Notifications"
PURPOSE "Support for the Freedesktop Notification Frontend."
TYPE OPTIONAL)
if(Qt5DBus_FOUND)

View File

@ -1,10 +1,16 @@
find_package(Qt5WebSockets REQUIRED)
find_package(Qt5WebSockets QUIET)
set( PUSHOVER_FRONTEND_SRC
pushover_frontend.cpp
pushoversettings.cpp
)
set_package_properties(Qt5WebSockets PROPERTIES
PURPOSE "Support for the Pushover Notification frontend."
TYPE OPTIONAL)
add_library(libsnore_frontend_pushover MODULE ${PUSHOVER_FRONTEND_SRC} )
target_link_libraries(libsnore_frontend_pushover Snore::Libsnore Qt5::WebSockets )
if(Qt5WebSockets_FOUND)
set( PUSHOVER_FRONTEND_SRC
pushover_frontend.cpp
pushoversettings.cpp
)
add_library(libsnore_frontend_pushover MODULE ${PUSHOVER_FRONTEND_SRC} )
target_link_libraries(libsnore_frontend_pushover Snore::Libsnore Qt5::WebSockets )
endif()