3 add_definitions(-DQT_STRICT_ITERATORS)
5 add_definitions( -DQT_NO_CAST_FROM_ASCII )
6 add_definitions( -DQT_NO_CAST_TO_ASCII )
8 set(CMAKE_AUTOMOC_RELAXED_MODE ON)
14 ${CMAKE_CURRENT_BINARY_DIR}
15 ${CMAKE_CURRENT_SOURCE_DIR}/
16 ${CMAKE_CURRENT_SOURCE_DIR}/lib
19 add_subdirectory(appicons)
20 add_subdirectory(pixmaps)
21 add_subdirectory(autostart)
22 add_subdirectory(kconf_update)
24 set(libkalarm_common_SRCS)
25 ecm_qt_declare_logging_category(libkalarm_common_SRCS HEADER kalarm_debug.h IDENTIFIER KALARM_LOG CATEGORY_NAME log_kalarm)
27 ########### next target ###############
51 lib/stackedwidgets.cpp
56 set(kalarm_bin_SRCS ${libkalarm_SRCS}
57 ${libkalarm_common_SRCS}
101 templatemenuaction.cpp
104 set(kalarm_bin_SRCS ${kalarm_bin_SRCS}
105 kalarmmigrateapplication.cpp
107 akonadiresourcecreator.cpp
115 ki18n_wrap_ui(kalarm_bin_SRCS
119 qt5_add_dbus_adaptor(kalarm_bin_SRCS org.kde.kalarm.kalarm.xml dbushandler.h DBusHandler)
120 qt5_add_dbus_interfaces(kalarm_bin_SRCS ${CMAKE_BINARY_DIR}/kmail/org.kde.kmail.kmail.xml)
122 kcfg_generate_dbus_interface(${CMAKE_CURRENT_SOURCE_DIR}/kalarmresource.kcfg org.kde.Akonadi.KAlarm.Settings)
123 qt5_add_dbus_interface(kalarm_bin_SRCS ${CMAKE_CURRENT_BINARY_DIR}/org.kde.Akonadi.KAlarm.Settings.xml kalarmsettings KAlarmSettings)
125 kcfg_generate_dbus_interface(${CMAKE_CURRENT_SOURCE_DIR}/kalarmdirresource.kcfg org.kde.Akonadi.KAlarmDir.Settings)
126 qt5_add_dbus_interface(kalarm_bin_SRCS ${CMAKE_CURRENT_BINARY_DIR}/org.kde.Akonadi.KAlarmDir.Settings.xml kalarmdirsettings KAlarmDirSettings)
128 qt5_add_dbus_interfaces(kalarm_bin_SRCS ${AKONADI_DBUS_INTERFACES_DIR}/org.freedesktop.Akonadi.Agent.Control.xml)
129 #qt5_add_dbus_adaptor(kalarm_bin_SRCS ${AKONADI_DBUS_INTERFACES_DIR}/org.freedesktop.Akonadi.Agent.Control.xml agentbase.h Akonadi::AgentBase controladaptor Akonadi__ControlAdaptor)
131 kconfig_add_kcfg_files(kalarm_bin_SRCS GENERATE_MOC kalarmconfig.kcfgc)
134 file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/appicons/*-apps-kalarm.png")
135 ecm_add_app_icon(kalarm_bin_SRCS ICONS ${ICONS_SRCS})
136 add_executable(kalarm_bin ${kalarm_bin_SRCS})
137 add_dependencies(kalarm_bin kmail_xml)
139 set_target_properties(kalarm_bin PROPERTIES OUTPUT_NAME kalarm)
141 target_link_libraries(kalarm_bin
147 KF5::IdentityManagement
162 if (Qt5X11Extras_FOUND)
163 target_link_libraries(kalarm_bin Qt5::X11Extras)
167 install(TARGETS kalarm_bin ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
170 ########### install files ###############
172 install(PROGRAMS org.kde.kalarm.desktop DESTINATION ${KDE_INSTALL_APPDIR})
173 install(PROGRAMS kalarm.autostart.desktop DESTINATION ${KDE_INSTALL_AUTOSTARTDIR})
174 install(FILES kalarm.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
175 install(FILES kalarmconfig.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR})
176 install(FILES kalarmui.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/kalarm)
177 install(FILES org.kde.kalarm.kalarm.xml DESTINATION ${KDE_INSTALL_DBUSINTERFACEDIR})
179 ########### KAuth helper ###############
181 add_executable(kalarm_helper rtcwakeaction.cpp ${libkalarm_common_SRCS})
182 target_link_libraries(kalarm_helper KF5::Auth KF5::KDELibs4Support)
183 install(TARGETS kalarm_helper DESTINATION ${KDE_INSTALL_LIBEXECDIR})
184 kauth_install_helper_files(kalarm_helper org.kde.kalarmrtcwake root)
185 kauth_install_actions(org.kde.kalarmrtcwake rtcwakeaction.actions)