2023-02-13 17:10:55 +08:00
|
|
|
|
set(VERSION_MAJOR 1)
|
2024-06-19 10:41:56 +08:00
|
|
|
|
set(VERSION_MINOR 1)
|
2023-02-13 17:10:55 +08:00
|
|
|
|
set(VERSION_MICRO 0)
|
2024-06-19 10:41:56 +08:00
|
|
|
|
#changelog v1.0.0->v1.1.0:超时时间统一为单位为ms
|
2023-02-13 17:10:55 +08:00
|
|
|
|
set(NOTIFICATION_SERVER_VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_MICRO})
|
|
|
|
|
|
2023-02-01 18:08:11 +08:00
|
|
|
|
configure_file (notification-server-config.h.in notification-server-config.h @ONLY)
|
|
|
|
|
set(3rdParties_DIR ../3rd-parties/qtsingleapplication/src/)
|
2023-01-31 17:39:14 +08:00
|
|
|
|
set(notificationServer_SRCS
|
|
|
|
|
server.h
|
|
|
|
|
server-private.h
|
|
|
|
|
server.cpp
|
|
|
|
|
main.cpp
|
2023-02-01 18:08:11 +08:00
|
|
|
|
${3rdParties_DIR}qtsinglecoreapplication.h
|
|
|
|
|
${3rdParties_DIR}qtsinglecoreapplication.cpp
|
|
|
|
|
${3rdParties_DIR}qtlocalpeer.h
|
|
|
|
|
${3rdParties_DIR}qtlocalpeer.cpp
|
2023-02-03 18:01:06 +08:00
|
|
|
|
notification-server-application.cpp
|
|
|
|
|
notification-server-application.h
|
2023-08-01 17:10:26 +08:00
|
|
|
|
log-utils.h
|
|
|
|
|
log-utils.cpp)
|
2023-02-06 17:03:12 +08:00
|
|
|
|
if(COMMAND qt_add_dbus_adaptor)
|
|
|
|
|
qt_add_dbus_adaptor(notificationServer_SRCS ../dbus/org.freedesktop.Notifications.xml server-private.h NotificationServer::ServerPrivate)
|
|
|
|
|
qt_add_dbus_adaptor(notificationServer_SRCS ../dbus/org.ukui.NotificationServer.xml server-private.h NotificationServer::ServerPrivate)
|
|
|
|
|
else()
|
|
|
|
|
qt5_add_dbus_adaptor(notificationServer_SRCS ../dbus/org.freedesktop.Notifications.xml server-private.h NotificationServer::ServerPrivate)
|
|
|
|
|
qt5_add_dbus_adaptor(notificationServer_SRCS ../dbus/org.ukui.NotificationServer.xml server-private.h NotificationServer::ServerPrivate)
|
|
|
|
|
endif()
|
2023-01-31 17:39:14 +08:00
|
|
|
|
add_executable(ukui-notification-server ${notificationServer_SRCS})
|
2023-02-13 17:10:55 +08:00
|
|
|
|
include_directories(../libukui-notification)
|
2023-02-01 18:08:11 +08:00
|
|
|
|
target_include_directories(ukui-notification-server PUBLIC ${3rdParties_DIR})
|
|
|
|
|
|
2023-01-31 17:39:14 +08:00
|
|
|
|
target_link_libraries(ukui-notification-server
|
|
|
|
|
PRIVATE
|
|
|
|
|
Qt${QT_VERSION_MAJOR}::Core
|
|
|
|
|
Qt${QT_VERSION_MAJOR}::DBus
|
2023-02-01 18:08:11 +08:00
|
|
|
|
Qt${QT_VERSION_MAJOR}::Network
|
2023-02-13 17:10:55 +08:00
|
|
|
|
ukui-notification
|
2023-01-31 17:39:14 +08:00
|
|
|
|
)
|
|
|
|
|
set(TS_FILES ukui-notification_zh_CN.ts)
|
|
|
|
|
if(COMMAND qt_create_translation)
|
|
|
|
|
qt_create_translation(QM_FILES ${CMAKE_SOURCE_DIR}/translations ${TS_FILES})
|
|
|
|
|
else()
|
|
|
|
|
qt5_create_translation(QM_FILES ${CMAKE_SOURCE_DIR}/translations ${TS_FILES})
|
2023-02-13 17:10:55 +08:00
|
|
|
|
endif()
|
|
|
|
|
set(DBUS_SERVICE_FILE data/org.freedesktop.Notifications.service)
|
2023-08-01 10:18:06 +08:00
|
|
|
|
set(DESKTOP_FILE data/ukui-notification-server.desktop)
|
2023-02-13 17:10:55 +08:00
|
|
|
|
install(TARGETS ukui-notification-server DESTINATION /usr/bin)
|
2023-02-20 09:24:12 +08:00
|
|
|
|
install(FILES ${DBUS_SERVICE_FILE} DESTINATION /usr/share/dbus-1/services)
|
2023-08-01 10:18:06 +08:00
|
|
|
|
install(FILES ${DESKTOP_FILE} DESTINATION /etc/xdg/autostart)
|