SVN_SILENT made messages (.desktop file) - always resolve ours
[kdepim.git] / kalarm / CMakeLists.txt
blob41a6bffdfa2499a02bcfe76de2e7a4ef7cc04b3f
1 project(kalarm)
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)
13 include_directories(
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 ###############
28 set(libkalarm_SRCS
29     lib/buttongroup.cpp
30     lib/checkbox.cpp
31     lib/colourbutton.cpp
32     lib/combobox.cpp
33     lib/desktop.cpp
34     lib/filedialog.cpp
35     lib/groupbox.cpp
36     lib/itembox.cpp
37     lib/kalocale.cpp
38     lib/label.cpp
39     lib/messagebox.cpp
40     lib/packedlayout.cpp
41     lib/pushbutton.cpp
42     lib/radiobutton.cpp
43     lib/timeedit.cpp
44     lib/timespinbox.cpp
45     lib/timeperiod.cpp
46     lib/timezonecombo.cpp
47     lib/shellprocess.cpp
48     lib/slider.cpp
49     lib/spinbox.cpp
50     lib/spinbox2.cpp
51     lib/stackedwidgets.cpp
52     lib/lineedit.cpp
53     lib/synchtimer.cpp
56 set(kalarm_bin_SRCS ${libkalarm_SRCS}
57     ${libkalarm_common_SRCS}
58     birthdaydlg.cpp
59     birthdaymodel.cpp
60     main.cpp
61     editdlg.cpp
62     editdlgtypes.cpp
63     soundpicker.cpp
64     sounddlg.cpp
65     alarmcalendar.cpp
66     undo.cpp
67     kalarmapp.cpp
68     mainwindowbase.cpp
69     mainwindow.cpp
70     messagewin.cpp
71     preferences.cpp
72     prefdlg.cpp
73     traywindow.cpp
74     dbushandler.cpp
75     recurrenceedit.cpp
76     deferdlg.cpp
77     functions.cpp
78     fontcolour.cpp
79     fontcolourbutton.cpp
80     alarmtime.cpp
81     alarmtimewidget.cpp
82     specialactions.cpp
83     reminder.cpp
84     startdaytimer.cpp
85     eventlistview.cpp
86     alarmlistdelegate.cpp
87     alarmlistview.cpp
88     templatelistview.cpp
89     kamail.cpp
90     timeselector.cpp
91     latecancel.cpp
92     repetitionbutton.cpp
93     emailidcombo.cpp
94     find.cpp
95     pickfileradio.cpp
96     newalarmaction.cpp
97     commandoptions.cpp
98     resourceselector.cpp
99     templatepickdlg.cpp
100     templatedlg.cpp
101     templatemenuaction.cpp
102     wakedlg.cpp
104 set(kalarm_bin_SRCS ${kalarm_bin_SRCS}
105     kalarmmigrateapplication.cpp
106     akonadimodel.cpp
107     akonadiresourcecreator.cpp
108     collectionmodel.cpp
109     collectionsearch.cpp
110     itemlistmodel.cpp
111     calendarmigrator.cpp
112     eventid.cpp
113    )
115 ki18n_wrap_ui(kalarm_bin_SRCS
116     wakedlg.ui
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)
133 #if (UNIX)
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
142 KF5::AlarmCalendar
143 KF5::CalendarCore
144 KF5::CalendarUtils
145 KF5::Contacts
146 KF5::Mime
147 KF5::IdentityManagement
148 KF5::MailTransport
149 KF5::AkonadiCore
150 KF5::AkonadiMime
151 KF5::AkonadiContact
152 KF5::Holidays
153 KF5::Codecs
154 KF5::ConfigCore
155 KF5::Libkdepim
156 Phonon::phonon4qt5
157 KF5::Auth
158 KF5::DBusAddons
159 KF5::PimCommon
162 if (Qt5X11Extras_FOUND)
163   target_link_libraries(kalarm_bin Qt5::X11Extras)
164 endif()
167 install(TARGETS kalarm_bin ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
168 #endif (UNIX)
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)