3 add_definitions(-DQT_STRICT_ITERATORS)
4 add_definitions(-DQT_NO_CAST_FROM_ASCII)
5 add_definitions(-DQT_NO_CAST_TO_ASCII)
6 add_definitions(-DQT_MESSAGELOGCONTEXT)
8 set(CMAKE_AUTOMOC_RELAXED_MODE ON)
12 ${CMAKE_CURRENT_BINARY_DIR}
13 ${CMAKE_CURRENT_SOURCE_DIR}/
14 ${CMAKE_CURRENT_SOURCE_DIR}/lib
17 add_subdirectory(appicons)
18 add_subdirectory(pixmaps)
19 add_subdirectory(autostart)
20 add_subdirectory(kconf_update)
22 set(libkalarm_common_SRCS)
23 ecm_qt_declare_logging_category(libkalarm_common_SRCS
26 CATEGORY_NAME log_kalarm
27 DEFAULT_SEVERITY Warning)
29 ########### next target ###############
53 lib/stackedwidgets.cpp
58 set(kalarm_bin_SRCS ${libkalarm_SRCS}
59 ${libkalarm_common_SRCS}
103 templatemenuaction.cpp
106 set(kalarm_bin_SRCS ${kalarm_bin_SRCS}
107 kalarmmigrateapplication.cpp
109 akonadiresourcecreator.cpp
117 ki18n_wrap_ui(kalarm_bin_SRCS
121 qt5_add_dbus_adaptor(kalarm_bin_SRCS org.kde.kalarm.kalarm.xml dbushandler.h DBusHandler)
122 qt5_add_dbus_interfaces(kalarm_bin_SRCS ${CMAKE_BINARY_DIR}/kmail/org.kde.kmail.kmail.xml)
124 kcfg_generate_dbus_interface(${CMAKE_CURRENT_SOURCE_DIR}/kalarmresource.kcfg org.kde.Akonadi.KAlarm.Settings)
125 qt5_add_dbus_interface(kalarm_bin_SRCS ${CMAKE_CURRENT_BINARY_DIR}/org.kde.Akonadi.KAlarm.Settings.xml kalarmsettings KAlarmSettings)
127 kcfg_generate_dbus_interface(${CMAKE_CURRENT_SOURCE_DIR}/kalarmdirresource.kcfg org.kde.Akonadi.KAlarmDir.Settings)
128 qt5_add_dbus_interface(kalarm_bin_SRCS ${CMAKE_CURRENT_BINARY_DIR}/org.kde.Akonadi.KAlarmDir.Settings.xml kalarmdirsettings KAlarmDirSettings)
130 qt5_add_dbus_interfaces(kalarm_bin_SRCS ${AKONADI_DBUS_INTERFACES_DIR}/org.freedesktop.Akonadi.Agent.Control.xml)
131 #qt5_add_dbus_adaptor(kalarm_bin_SRCS ${AKONADI_DBUS_INTERFACES_DIR}/org.freedesktop.Akonadi.Agent.Control.xml agentbase.h Akonadi::AgentBase controladaptor Akonadi__ControlAdaptor)
133 kconfig_add_kcfg_files(kalarm_bin_SRCS GENERATE_MOC kalarmconfig.kcfgc)
136 file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/appicons/*-apps-kalarm.png")
137 ecm_add_app_icon(kalarm_bin_SRCS ICONS ${ICONS_SRCS})
138 add_executable(kalarm_bin ${kalarm_bin_SRCS})
139 add_dependencies(kalarm_bin kmail_xml)
141 set_target_properties(kalarm_bin PROPERTIES OUTPUT_NAME kalarm)
143 target_link_libraries(kalarm_bin
149 KF5::IdentityManagement
164 if (Qt5X11Extras_FOUND)
165 target_link_libraries(kalarm_bin Qt5::X11Extras)
169 install(TARGETS kalarm_bin ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
172 ########### install files ###############
174 install(PROGRAMS org.kde.kalarm.desktop DESTINATION ${KDE_INSTALL_APPDIR})
175 install(PROGRAMS kalarm.autostart.desktop DESTINATION ${KDE_INSTALL_AUTOSTARTDIR})
176 install(FILES kalarm.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
177 install(FILES kalarmconfig.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR})
178 install(FILES kalarmui.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/kalarm)
179 install(FILES org.kde.kalarm.kalarm.xml DESTINATION ${KDE_INSTALL_DBUSINTERFACEDIR})
181 ########### KAuth helper ###############
183 add_executable(kalarm_helper rtcwakeaction.cpp ${libkalarm_common_SRCS})
184 target_link_libraries(kalarm_helper KF5::Auth KF5::KDELibs4Support)
185 install(TARGETS kalarm_helper DESTINATION ${KDE_INSTALL_LIBEXECDIR})
186 kauth_install_helper_files(kalarm_helper org.kde.kalarmrtcwake root)
187 kauth_install_actions(org.kde.kalarmrtcwake rtcwakeaction.actions)