CMakeLists.txt 7.15 KB
Newer Older
Laurent Montel's avatar
Laurent Montel committed
1
configure_file(akregator-version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/akregator-version.h @ONLY)
2
include_directories(
Laurent Montel's avatar
Laurent Montel committed
3
4
5
    ${CMAKE_CURRENT_SOURCE_DIR}/command/
    ${CMAKE_CURRENT_SOURCE_DIR}/formatter/
    ${CMAKE_CURRENT_SOURCE_DIR}/subscription/
Laurent Montel's avatar
Laurent Montel committed
6
    ${CMAKE_CURRENT_SOURCE_DIR}/feed/
Laurent Montel's avatar
Laurent Montel committed
7
    ${CMAKE_CURRENT_SOURCE_DIR}/urlhandler/
Laurent Montel's avatar
Laurent Montel committed
8
    ${CMAKE_CURRENT_SOURCE_DIR}/actions/
Laurent Montel's avatar
Laurent Montel committed
9
    ${CMAKE_CURRENT_SOURCE_DIR}/frame/
Laurent Montel's avatar
Laurent Montel committed
10
    )
11

12
add_subdirectory(icons)
13

14

15
16
########### next target ###############

17
set(akregator_common_SRCS)
18
ecm_qt_declare_logging_category(akregator_common_SRCS HEADER akregator_debug.h IDENTIFIER AKREGATOR_LOG CATEGORY_NAME org.kde.pim.akregator
Laurent Montel's avatar
Laurent Montel committed
19
20
21
22
        DESCRIPTION "akregator (akregator)"
        OLD_CATEGORY_NAMES log_akregator
        EXPORT AKREGATOR
    )
23
24

set(akregator_SRCS main.cpp mainwindow.cpp ${akregator_common_SRCS})
25

Daniel Vrátil's avatar
Daniel Vrátil committed
26
file(GLOB ICONS_AKREGATOR_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/icons/*-apps-akregator.png")
Laurent Montel's avatar
Laurent Montel committed
27
ecm_add_app_icon(akregator_SRCS ICONS ${ICONS_AKREGATOR_SRCS})
28

Laurent Montel's avatar
Laurent Montel committed
29
add_executable(akregator ${akregator_SRCS})
30

31
target_link_libraries(akregator
Heiko Becker's avatar
Heiko Becker committed
32
    KF5::Crash
33
34
    KF5::Notifications
    KF5::KontactInterface
35
    KF5::Libkdepim
36
37
38
39
    akregatorprivate
    akregatorinterfaces
    KF5::PimCommon
    )
40

41
install(TARGETS akregator ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
42

43
44
########### next target ###############

Laurent Montel's avatar
Laurent Montel committed
45
46
47
48
49
50
set(akregator_articleviewer_ng_webengine_SRCS
    articleviewer-ng/webengine/articleviewerwebengine.cpp
    articleviewer-ng/webengine/articleviewerwebenginepage.cpp
    articleviewer-ng/webengine/articlehtmlwebenginewriter.cpp
    articleviewer-ng/webengine/articleviewerwebenginewidgetng.cpp
    )
Laurent Montel's avatar
Laurent Montel committed
51

52
53
set(akregator_job_SRCS
    job/downloadarticlejob.cpp
Laurent Montel's avatar
Laurent Montel committed
54
    job/downloadfeediconjob.cpp
55
    )
56

Laurent Montel's avatar
Laurent Montel committed
57
58
59
60
set(akregatorprivate_formatter_SRCS
    formatter/articleformatter.cpp
    formatter/defaultnormalviewformatter.cpp
    formatter/defaultcombinedviewformatter.cpp
61
    formatter/grantleeviewformatter.cpp
62
    formatter/articlegrantleeobject.cpp
Laurent Montel's avatar
Laurent Montel committed
63
    formatter/grantleeutil.cpp
Laurent Montel's avatar
Laurent Montel committed
64
65
    )

66
set(akregatorprivate_frame_SRCS
67
68
    frame/webengine/webengineframe.cpp
    frame/webengine/akrwebengineviewer.cpp
Laurent Montel's avatar
Laurent Montel committed
69
70
71
72
73
    frame/frame.cpp
    frame/mainframe.cpp
    frame/framemanager.cpp
    )

Laurent Montel's avatar
Laurent Montel committed
74
75
76
77
set(akregatorprivate_urlhandlerwebengine_SRCS
    urlhandler/webengine/urlhandlerwebengine.cpp
    urlhandler/webengine/urlhandlerwebenginemanager.cpp
    )
Laurent Montel's avatar
Laurent Montel committed
78

79
set(akregatorprivate_LIB_SRCS
80
    ${akregatorprivate_userfeedback_LIB_SRCS}
81
    akregratormigrateapplication.cpp
Laurent Montel's avatar
Laurent Montel committed
82
    ${akregatorprivate_frame_SRCS}
Laurent Montel's avatar
Laurent Montel committed
83
    ${akregatorprivate_urlhandler_SRCS}
84
    ${akregator_articleviewer_ng_SRCS}
85
    ${akregator_articleviewer_ng_webengine_SRCS}
86
    ${akregator_common_SRCS}
Laurent Montel's avatar
Laurent Montel committed
87
    ${akregatorprivate_formatter_SRCS}
88
    ${akregatorprivate_urlhandlerwebengine_SRCS}
Laurent Montel's avatar
Laurent Montel committed
89
    ${akregator_job_SRCS}
Laurent Montel's avatar
Laurent Montel committed
90
    articleviewerwidget.cpp
91
92
    aboutdata.cpp
    trayicon.cpp
93
    unityservicemanager.cpp
94
    article.cpp
Laurent Montel's avatar
Laurent Montel committed
95
96
    feed/feed.cpp
    feed/feedlist.cpp
97
    feed/feedretriever.cpp
98
99
100
101
102
103
104
    treenode.cpp
    treenodevisitor.cpp
    utils.cpp
    notificationmanager.cpp
    articlejobs.cpp
    folder.cpp
    kernel.cpp
Laurent Montel's avatar
Laurent Montel committed
105
    subscription/subscriptionlistjobs.cpp
106
107
    fetchqueue.cpp
    openurlrequest.cpp
Laurent Montel's avatar
Laurent Montel committed
108
109
    actions/actionmanager.cpp
    actions/actions.cpp
Laurent Montel's avatar
Laurent Montel committed
110
    akregator.qrc
111
    )
112

113
add_library(akregatorprivate ${akregatorprivate_LIB_SRCS})
114
115
116
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
    set_target_properties(akregatorprivate PROPERTIES UNITY_BUILD ON)
endif()
Laurent Montel's avatar
Laurent Montel committed
117
generate_export_header(akregatorprivate BASE_NAME akregator)
118

119
120
121
122
123
124
set(akregator_userfeedback_LIB)
if (TARGET KUserFeedbackWidgets)
    set(akregator_userfeedback_LIB KUserFeedbackWidgets)
endif()


125
target_link_libraries(akregatorprivate
126
127
128
    PRIVATE
    KF5::Parts
    KF5::Notifications
129
    KF5::Libkdepim
130
131
132
133
134
    KF5::Syndication
    akregatorinterfaces
    KF5::PimCommon
    KF5::PimTextEdit
    KF5::GrantleeTheme
135
    Grantlee5::Templates
136
    KF5::KIOGui
137
    KF5::MessageViewer
138
    Qt::PrintSupport
139
    KF5::WebEngineViewer
140
    ${akregator_userfeedback_LIB}
141
    )
142

143
144
target_include_directories(akregatorprivate PUBLIC "$<BUILD_INTERFACE:${akregator_SOURCE_DIR}/src;${akregator_BINARY_DIR}/src>")

Dirk Mueller's avatar
Dirk Mueller committed
145
set_target_properties(akregatorprivate
146
147
148
    PROPERTIES VERSION ${KDEPIM_LIB_VERSION}
    SOVERSION ${KDEPIM_LIB_SOVERSION}
    )
149
install(TARGETS akregatorprivate ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP)
150
151
152

########### next target ###############

Laurent Montel's avatar
Laurent Montel committed
153
set(akregator_crashwidget_SRCS
154
155
    crashwidget/crashwidget.cpp
    )
Laurent Montel's avatar
Laurent Montel committed
156

157
set(akregator_utils_SRCS
158
159
160
161
162
163
164
165
166
167
168
169
170
    utils/filtercolumnsproxymodel.cpp
    )

set(akregatorpart_command_SRCS
    command/deletesubscriptioncommand.cpp
    command/createfeedcommand.cpp
    command/createfoldercommand.cpp
    command/expireitemscommand.cpp
    command/loadfeedlistcommand.cpp
    command/editsubscriptioncommand.cpp
    command/importfeedlistcommand.cpp
    )

Laurent Montel's avatar
Laurent Montel committed
171
172
set(akregatorpart_widgets_SRCS
    widgets/statussearchline.cpp
Laurent Montel's avatar
Laurent Montel committed
173
    widgets/searchbar.cpp
174
    widgets/akregatorcentralwidget.cpp
175
    )
Laurent Montel's avatar
Laurent Montel committed
176

Laurent Montel's avatar
Laurent Montel committed
177
178
179
180
181
182
set(akregatorpart_subscription_SRCS
    subscription/subscriptionlistview.cpp
    subscription/subscriptionlistdelegate.cpp
    subscription/subscriptionlistmodel.cpp
    )

183
set(akregatorpart_PART_SRCS
Laurent Montel's avatar
Laurent Montel committed
184
    ${akregator_crashwidget_SRCS}
Laurent Montel's avatar
Laurent Montel committed
185
    ${akregatorpart_subscription_SRCS}
Laurent Montel's avatar
Laurent Montel committed
186
    ${akregatorpart_widgets_SRCS}
187
188
189
190
191
192
193
194
195
    ${akregatorpart_command_SRCS}
    ${akregator_utils_SRCS}
    ${akregator_common_SRCS}
    abstractselectioncontroller.cpp
    articlematcher.cpp
    articlemodel.cpp
    pluginmanager.cpp
    selectioncontroller.cpp
    articlelistview.cpp
Laurent Montel's avatar
Laurent Montel committed
196
    actions/actionmanagerimpl.cpp
197
    addfeeddialog.cpp
Laurent Montel's avatar
Laurent Montel committed
198
    feed/feedpropertiesdialog.cpp
199
200
201
202
203
204
205
206
    tabwidget.cpp
    progressmanager.cpp
    akregator_part.cpp
    mainwidget.cpp
    dummystorage/storagedummyimpl.cpp
    dummystorage/storagefactorydummyimpl.cpp
    dummystorage/feedstoragedummyimpl.cpp
    )
207

Laurent Montel's avatar
Laurent Montel committed
208
qt5_add_dbus_adaptor(akregatorpart_PART_SRCS org.kde.akregator.part.xml akregator_part.h Akregator::Part)
209

Laurent Montel's avatar
Laurent Montel committed
210
ki18n_wrap_ui(akregatorpart_PART_SRCS
211
212
213
    ui/addfeedwidgetbase.ui
    ui/feedpropertieswidgetbase.ui
    )
214

Laurent Montel's avatar
Laurent Montel committed
215
add_library(akregatorpart MODULE ${akregatorpart_PART_SRCS})
Laurent Montel's avatar
Laurent Montel committed
216
generate_export_header(akregatorpart BASE_NAME akregatorpart)
217
target_link_libraries(akregatorpart
218
219
220
221
    akregatorinterfaces
    akregatorprivate
    KF5::KCMUtils
    KF5::NotifyConfig
222
    KF5::Libkdepim
223
224
225
226
227
    KF5::Syndication
    KF5::PimCommon
    KF5::PimTextEdit
    KF5::GrantleeTheme
    KF5::MessageViewer
Laurent Montel's avatar
Laurent Montel committed
228
229
    KF5::Parts
    KF5::Notifications
230
    Qt::WebEngineWidgets
231
    KF5::WebEngineViewer
Laurent Montel's avatar
Laurent Montel committed
232
    KF5::KIOGui
233
    )
234
235
236
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
    set_target_properties(akregatorpart PROPERTIES UNITY_BUILD ON)
endif()
237

238
install(TARGETS akregatorpart DESTINATION ${KDE_INSTALL_PLUGINDIR})
239
240
241

########### install files ###############

Laurent Montel's avatar
Laurent Montel committed
242
install(PROGRAMS data/org.kde.akregator.desktop DESTINATION ${KDE_INSTALL_APPDIR})
Laurent Montel's avatar
Laurent Montel committed
243
install(FILES data/org.kde.akregator.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
244
install(FILES data/akregator_plugin.desktop DESTINATION ${KDE_INSTALL_KSERVICETYPES5DIR})
245
246
install(FILES feed.protocol DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
install(FILES org.kde.akregator.part.xml DESTINATION ${KDE_INSTALL_DBUSINTERFACEDIR})
247
install(FILES data/akregator.notifyrc DESTINATION ${KDE_INSTALL_KNOTIFY5RCDIR} )
248

Laurent Montel's avatar
Laurent Montel committed
249
add_subdirectory(formatter/html)
Laurent Montel's avatar
Laurent Montel committed
250
251
252
if(BUILD_TESTING)
   add_subdirectory(job/autotests)
endif()