summaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
blob: c749a693704e1b5764426e63cb76818238347398 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
### ------- sub dirs -------

ADD_SUBDIRECTORY( data )


### ------- SETTING REKONQ FILES..
add_definitions(-DQT_STATICPLUGIN)
QT4_WRAP_CPP(wk_HEADERS_MOC qwebkitplatformplugin.h)

# src files
set(rekonq_KDEINIT_SRCS
    #----------------------------------------
    application.cpp
    autosaver.cpp
    searchengine.cpp
    sessionmanager.cpp
    sessionwidget.cpp
    urlresolver.cpp
    websnap.cpp
    #----------------------------------------
    adblock/adblockhostmatcher.cpp
    adblock/adblockmanager.cpp
    adblock/adblockrule.cpp
    adblock/adblockrulefallbackimpl.cpp
    adblock/adblockrulenullimpl.cpp
    adblock/adblockruletextmatchimpl.cpp
    adblock/adblocksettingwidget.cpp
    #----------------------------------------
    bookmarks/bookmarkmanager.cpp
    bookmarks/bookmarkscontextmenu.cpp
    bookmarks/bookmarksmenu.cpp
    bookmarks/bookmarkstoolbar.cpp
    bookmarks/bookmarkstreemodel.cpp
    bookmarks/bookmarkowner.cpp
    #----------------------------------------
    download/downloaditem.cpp
    download/downloadmanager.cpp
    #----------------------------------------
    history/historymanager.cpp
    history/historymodels.cpp
    #----------------------------------------
    icons/icondownloader.cpp
    icons/iconmanager.cpp
    icons/webicon.cpp
    #----------------------------------------
    panels/bookmarkspanel.cpp
    panels/historypanel.cpp
    panels/paneltreeview.cpp
    panels/urlfilterproxymodel.cpp
    panels/urlpanel.cpp
    #----------------------------------------
    rekonqpage/newtabpage.cpp
    rekonqpage/thumbupdater.cpp
    #----------------------------------------
    settings/settingsdialog.cpp
    settings/appearancewidget.cpp
    settings/advancedwidget.cpp
    settings/generalwidget.cpp
    settings/privacywidget.cpp
    settings/tabswidget.cpp
    settings/webkitwidget.cpp
    settings/passexceptionswidget.cpp
    #----------------------------------------
    sync/ftpsynchandler.cpp
    sync/googlesynchandler.cpp
    sync/syncassistant.cpp
    sync/synchandler.cpp
    sync/syncmanager.cpp
    #
    sync/synccheckwidget.cpp
    sync/syncdatawidget.cpp
    sync/synchosttypewidget.cpp
    sync/syncftpsettingswidget.cpp
    sync/sshsynchandler.cpp
    sync/syncgooglesettingswidget.cpp
    sync/syncoperasettingswidget.cpp
    sync/syncsshsettingswidget.cpp 
    #----------------------------------------
    tabwindow/rwindow.cpp
    tabwindow/rekonqwindow.cpp
    tabwindow/tabbar.cpp
    tabwindow/tabhighlighteffect.cpp
    tabwindow/tabpreviewpopup.cpp
    tabwindow/tabwidget.cpp
    #----------------------------------------
    urlbar/urlbar.cpp
    urlbar/completionwidget.cpp
    urlbar/listitem.cpp
    urlbar/adblockwidget.cpp
    urlbar/bookmarkwidget.cpp
    urlbar/rsswidget.cpp
    urlbar/sslwidget.cpp
    urlbar/urlsuggester.cpp
    #----------------------------------------
    useragent/useragentinfo.cpp
    useragent/useragentmanager.cpp
    useragent/useragentwidget.cpp
    #----------------------------------------
    webtab/clicktoflash.cpp
    webtab/crashmessagebar.cpp
    webtab/networkaccessmanager.cpp
    webtab/previewselectorbar.cpp
    webtab/protocolhandler.cpp
    webtab/knetworkaccessmanager.cpp
    webtab/searchenginebar.cpp
    webtab/sslinfodialog.cpp
    webtab/walletbar.cpp
    webtab/webpage.cpp
    webtab/webpluginfactory.cpp
    webtab/websslinfo.cpp
    webtab/webview.cpp
    webtab/webtab.cpp
    #----------------------------------------
    webwindow/findbar.cpp
    webwindow/maintoolbar.cpp
    webwindow/rekonqfactory.cpp
    webwindow/rekonqmenu.cpp
    webwindow/webwindow.cpp
    #----------------------------------------
    kspellplugin.cpp
    ${wk_HEADERS_MOC}
)


# Nepomuk OPTIONAL src files
IF(NepomukCore_FOUND)
    SET( rekonq_KDEINIT_SRCS
            ${rekonq_KDEINIT_SRCS}
            urlbar/resourcelinkdialog.cpp
            urlbar/newresourcedialog.cpp
            nepomuk/utils/simpleresourcemodel.cpp
            nepomuk/utils/resourcemodel.cpp
    )
ENDIF(NepomukCore_FOUND)


# Opera sync optional src files
IF(HAVE_QCA2 AND HAVE_QTOAUTH)
    SET( rekonq_KDEINIT_SRCS
            ${rekonq_KDEINIT_SRCS}
            sync/operasynchandler.cpp
    )
ENDIF(HAVE_QCA2 AND HAVE_QTOAUTH)

# ui files
KDE4_ADD_UI_FILES( rekonq_KDEINIT_SRCS
    # ----------------------------------------
    adblock/blocked_elements.ui
    adblock/settings_adblock.ui
    #----------------------------------------
    settings/settings_general.ui
    settings/settings_tabs.ui
    settings/settings_appearance.ui
    settings/settings_webkit.ui
    settings/settings_advanced.ui
    settings/settings_privacy.ui
    settings/password_exceptions.ui
    # ----------------------------------------
    sync/sync_check.ui
    sync/sync_data.ui
    sync/sync_ftp_settings.ui
    sync/sync_google_settings.ui
    sync/sync_opera_settings.ui
    sync/sync_ssh_settings.ui
    sync/sync_host_type.ui
    # ----------------------------------------
    useragent/useragentsettings.ui
    # ----------------------------------------
    webtab/sslinfo.ui
    # ----------------------------------------
    cleardata.ui
    session.ui
    webappcreation.ui
 )


### ------------- INCLUDING DIRECTORIES...

INCLUDE_DIRECTORIES (   ${CMAKE_CURRENT_SOURCE_DIR}
                        ${CMAKE_CURRENT_SOURCE_DIR}/adblock
                        ${CMAKE_CURRENT_SOURCE_DIR}/bookmarks
                        ${CMAKE_CURRENT_SOURCE_DIR}/download
                        ${CMAKE_CURRENT_SOURCE_DIR}/history
                        ${CMAKE_CURRENT_SOURCE_DIR}/icons
                        ${CMAKE_CURRENT_SOURCE_DIR}/panels
                        ${CMAKE_CURRENT_SOURCE_DIR}/rekonqpage
                        ${CMAKE_CURRENT_SOURCE_DIR}/settings
                        ${CMAKE_CURRENT_SOURCE_DIR}/sync
                        ${CMAKE_CURRENT_SOURCE_DIR}/urlbar
                        ${CMAKE_CURRENT_SOURCE_DIR}/tabwindow
                        ${CMAKE_CURRENT_SOURCE_DIR}/useragent
                        ${CMAKE_CURRENT_SOURCE_DIR}/webtab
                        ${CMAKE_CURRENT_SOURCE_DIR}/webwindow
                        ${CMAKE_CURRENT_BINARY_DIR}
                        ${KDE4_INCLUDES}
                        ${QT4_INCLUDES}
)

# Nepomuk optional include directories
IF(SOPRANO_FOUND AND NepomukCore_FOUND)
    INCLUDE_DIRECTORIES(${SOPRANO_INCLUDE_DIR}
                        ${NEPOMUK_CORE_INCLUDE_DIR}
    )

    FIND_PACKAGE(Soprano REQUIRED)
    INCLUDE(SopranoAddOntology)
ENDIF(SOPRANO_FOUND AND NepomukCore_FOUND)

# Opera sync optional include directories
IF(HAVE_QCA2 AND HAVE_QTOAUTH)
    INCLUDE_DIRECTORIES(${QCA2_INCLUDE_DIR}
                        ${QTOAUTH_INCLUDE_DIR}
    )
ENDIF(HAVE_QCA2 AND HAVE_QTOAUTH)

# KActivities optional include directories
IF(KActivities_FOUND)
    INCLUDE_DIRECTORIES(${KACTIVITIES_INCLUDE_DIRS}
    )
ENDIF(KActivities_FOUND)


### -------------- ADDING DEFINITIONS...

ADD_DEFINITIONS ( ${KDE4_DEFINITIONS} )


### -------------- ADDING APPLICATION ICON...

KDE4_ADD_APP_ICON( rekonq_KDEINIT_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/../icons/hi*-app-rekonq.png )


### -------------- ADDING APPLICATION KCFG FILES...

KDE4_ADD_KCFG_FILES( rekonq_KDEINIT_SRCS rekonq.kcfgc )


### --------------- ADDING EXECUTABLE...

KDE4_ADD_KDEINIT_EXECUTABLE( rekonq ${rekonq_KDEINIT_SRCS} main.cpp )


### --------------- TARGETTING LINK LIBRARIES...

TARGET_LINK_LIBRARIES (     kdeinit_rekonq
                            ${QT_LIBRARIES}
                            ${QT_QTSCRIPT_LIBRARY}
                            ${QT_QTWEBKIT_LIBRARY}
                            ${KDE4_KDEWEBKIT_LIBS}
                            ${KDE4_KUTILS_LIBS}
                            ${KDE4_KDEUI_LIBS}
                            ${KDE4_KIO_LIBS}
                            ${KDE4_KPARTS_LIBS}
                            ${KDE4_SOLID_LIBS}
)

# Nepomuk optional target link libraries
IF(SOPRANO_FOUND AND NepomukCore_FOUND)
    TARGET_LINK_LIBRARIES(  kdeinit_rekonq
                            ${NEPOMUK_CORE_LIBRARY}
                            ${SOPRANO_LIBRARIES}
    )
ENDIF(SOPRANO_FOUND AND NepomukCore_FOUND)

# KActivities optional target link libraries
IF(HAVE_KACTIVITIES)
    TARGET_LINK_LIBRARIES(  kdeinit_rekonq
                            ${KACTIVITIES_LIBRARY}
    )
ENDIF(HAVE_KACTIVITIES)

# Opera sync optional link libraries
IF(HAVE_QCA2 AND HAVE_QTOAUTH)
    TARGET_LINK_LIBRARIES(  kdeinit_rekonq
                            ${QCA2_LIBRARY}
                            ${QTOAUTH_LIBRARY}
    )
ENDIF(HAVE_QCA2 AND HAVE_QTOAUTH)


### ------------ INSTALL FILES...

INSTALL( TARGETS rekonq ${INSTALL_TARGETS_DEFAULT_ARGS} )
INSTALL( TARGETS kdeinit_rekonq  ${INSTALL_TARGETS_DEFAULT_ARGS} )

# kwebapp script install (provided for retro-compatibility...)
#FILE( COPY data/kwebapp DESTINATION ${BIN_INSTALL_DIR}
#        FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE )

INSTALL( FILES rekonq.kcfg  DESTINATION  ${KCFG_INSTALL_DIR} )
INSTALL( FILES webwindow/rekonqui.rc  DESTINATION  ${DATA_INSTALL_DIR}/rekonq )