mirror of
https://github.com/status-im/snorenotify.git
synced 2025-02-18 11:17:21 +00:00
Use cmake_dependent_option for INSTALL_freedesktop_notification_service
This commit is contained in:
parent
be4ac91f9f
commit
4206d38c56
@ -33,7 +33,7 @@ script:
|
|||||||
- cd build
|
- cd build
|
||||||
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then cmake -G"Ninja" .. -DCMAKE_INSTALL_PREFIX=~/installs/ -DCMAKE_PREFIX_PATH=/usr/local/opt/qt5 ;fi
|
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then cmake -G"Ninja" .. -DCMAKE_INSTALL_PREFIX=~/installs/ -DCMAKE_PREFIX_PATH=/usr/local/opt/qt5 ;fi
|
||||||
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then cmake -G"Ninja" .. -DCMAKE_INSTALL_PREFIX=~/installs/ ;fi
|
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then cmake -G"Ninja" .. -DCMAKE_INSTALL_PREFIX=~/installs/ ;fi
|
||||||
- ninja
|
- ninja install
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
irc: "chat.freenode.net#snorenotify"
|
irc: "chat.freenode.net#snorenotify"
|
||||||
|
@ -3,7 +3,8 @@ set_package_properties(Qt5DBus PROPERTIES
|
|||||||
PURPOSE "Support for the Freedesktop Notification Frontend."
|
PURPOSE "Support for the Freedesktop Notification Frontend."
|
||||||
TYPE OPTIONAL)
|
TYPE OPTIONAL)
|
||||||
if(Qt5DBus_FOUND)
|
if(Qt5DBus_FOUND)
|
||||||
message(STATUS "Adding freedesktop notification frontend")
|
cmake_dependent_option(INSTALL_freedesktop_notification_service "Install snorenotify as a dbus service for recieving Notifications." ON "BUILD_daemon;WIN32 OR APPLE" OFF)
|
||||||
|
add_feature_info(INSTALL_freedesktop_notification_service INSTALL_freedesktop_notification_service "Install snorenotify as a dbus service for recieving Notifications.")
|
||||||
|
|
||||||
|
|
||||||
set( FREEDESKTOP_NOTIFICATION_FRONTEND_SRC
|
set( FREEDESKTOP_NOTIFICATION_FRONTEND_SRC
|
||||||
@ -18,24 +19,16 @@ if(Qt5DBus_FOUND)
|
|||||||
|
|
||||||
|
|
||||||
#install the dbus interface
|
#install the dbus interface
|
||||||
if(BUILD_daemon)
|
if(INSTALL_freedesktop_notification_service)
|
||||||
option(INSTALL_freedesktop_notification_service "Install snorenotify as a dbus service for recieving Notifications." OFF)
|
if(WIN32)
|
||||||
if(WIN32 OR APPLE)
|
set(SNORE_LOCATION ../bin/snorenotify)
|
||||||
set(INSTALL_freedesktop_notification_service ON)
|
else()
|
||||||
|
set(SNORE_LOCATION ${CMAKE_INSTALL_PREFIX}/bin/snorenotify)
|
||||||
endif()
|
endif()
|
||||||
add_feature_info(INSTALL_freedesktop_notification_service INSTALL_freedesktop_notification_service "Install snorenotify as a dbus service for recieving Notifications.")
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/org.freedesktop.Notifications.service.cmake ${CMAKE_CURRENT_BINARY_DIR}/org.freedesktop.Notifications.service)
|
||||||
|
|
||||||
if(INSTALL_freedesktop_notification_service)
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.freedesktop.Notifications.service
|
||||||
if(WIN32)
|
DESTINATION share/dbus-1/services/)
|
||||||
set(SNORE_LOCATION ../bin/snorenotify)
|
|
||||||
else()
|
|
||||||
set(SNORE_LOCATION ${CMAKE_INSTALL_PREFIX}/bin/snorenotify)
|
|
||||||
endif()
|
|
||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/org.freedesktop.Notifications.service.cmake ${CMAKE_CURRENT_BINARY_DIR}/org.freedesktop.Notifications.service)
|
|
||||||
|
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.freedesktop.Notifications.service
|
|
||||||
DESTINATION share/dbus-1/services/)
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
install(TARGETS libsnore_frontend_freedesktop ${SNORE_PLUGIN_INSTALL_PATH})
|
install(TARGETS libsnore_frontend_freedesktop ${SNORE_PLUGIN_INSTALL_PATH})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user