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