Debian Codegraph @

src/librssguard/CMakeLists.txt

raw
1 set(SOURCES
2 core/articlelistnotificationmodel.cpp
3 core/articlelistnotificationmodel.h
4 core/feeddownloader.cpp
5 core/feeddownloader.h
6 core/feedsmodel.cpp
7 core/feedsmodel.h
8 core/feedsproxymodel.cpp
9 core/feedsproxymodel.h
10 core/filterutils.cpp
11 core/filterutils.h
12 core/message.cpp
13 core/message.h
14 core/messagefilter.cpp
15 core/messagefilter.h
16 core/messageobject.cpp
17 core/messageobject.h
18 core/messagesforfiltersmodel.cpp
19 core/messagesforfiltersmodel.h
20 core/messagesmodel.cpp
21 core/messagesmodel.h
22 core/messagesmodelcache.cpp
23 core/messagesmodelcache.h
24 core/messagesmodelsqllayer.cpp
25 core/messagesmodelsqllayer.h
26 core/messagesproxymodel.cpp
27 core/messagesproxymodel.h
28 database/databasecleaner.cpp
29 database/databasecleaner.h
30 database/databasedriver.cpp
31 database/databasedriver.h
32 database/databasefactory.cpp
33 database/databasefactory.h
34 database/databasequeries.cpp
35 database/databasequeries.h
36 database/mariadbdriver.cpp
37 database/mariadbdriver.h
38 database/sqlitedriver.cpp
39 database/sqlitedriver.h
40 definitions/definitions.h
41 definitions/globals.cpp
42 definitions/globals.h
43 definitions/typedefs.h
44 dynamic-shortcuts/dynamicshortcuts.cpp
45 dynamic-shortcuts/dynamicshortcuts.h
46 dynamic-shortcuts/dynamicshortcutswidget.cpp
47 dynamic-shortcuts/dynamicshortcutswidget.h
48 dynamic-shortcuts/shortcutcatcher.cpp
49 dynamic-shortcuts/shortcutcatcher.h
50 exceptions/applicationexception.cpp
51 exceptions/applicationexception.h
52 exceptions/feedfetchexception.cpp
53 exceptions/feedfetchexception.h
54 exceptions/feedrecognizedbutfailedexception.cpp
55 exceptions/feedrecognizedbutfailedexception.h
56 exceptions/filteringexception.cpp
57 exceptions/filteringexception.h
58 exceptions/ioexception.cpp
59 exceptions/ioexception.h
60 exceptions/networkexception.cpp
61 exceptions/networkexception.h
62 exceptions/processexception.cpp
63 exceptions/processexception.h
64 exceptions/scriptexception.cpp
65 exceptions/scriptexception.h
66 gui/dialogs/filedialog.cpp
67 gui/dialogs/filedialog.h
68 gui/dialogs/formabout.cpp
69 gui/dialogs/formabout.h
70 gui/dialogs/formaddaccount.cpp
71 gui/dialogs/formaddaccount.h
72 gui/dialogs/formbackupdatabasesettings.cpp
73 gui/dialogs/formbackupdatabasesettings.h
74 gui/dialogs/formdatabasecleanup.cpp
75 gui/dialogs/formdatabasecleanup.h
76 gui/dialogs/formlog.cpp
77 gui/dialogs/formlog.h
78 gui/dialogs/formmain.cpp
79 gui/dialogs/formmain.h
80 gui/dialogs/formmessagefiltersmanager.cpp
81 gui/dialogs/formmessagefiltersmanager.h
82 gui/dialogs/formrestoredatabasesettings.cpp
83 gui/dialogs/formrestoredatabasesettings.h
84 gui/dialogs/formsettings.cpp
85 gui/dialogs/formsettings.h
86 gui/dialogs/formupdate.cpp
87 gui/dialogs/formupdate.h
88 gui/feedmessageviewer.cpp
89 gui/feedmessageviewer.h
90 gui/feedsview.cpp
91 gui/feedsview.h
92 gui/guiutilities.cpp
93 gui/guiutilities.h
94 gui/itemdetails.cpp
95 gui/itemdetails.h
96 gui/messagebox.cpp
97 gui/messagebox.h
98 gui/messagepreviewer.cpp
99 gui/messagepreviewer.h
100 gui/messagesview.cpp
101 gui/messagesview.h
102 gui/notifications/articlelistnotification.cpp
103 gui/notifications/articlelistnotification.h
104 gui/notifications/basetoastnotification.cpp
105 gui/notifications/basetoastnotification.h
106 gui/notifications/notificationseditor.cpp
107 gui/notifications/notificationseditor.h
108 gui/notifications/singlenotificationeditor.cpp
109 gui/notifications/singlenotificationeditor.h
110 gui/notifications/toastnotification.cpp
111 gui/notifications/toastnotification.h
112 gui/notifications/toastnotificationsmanager.cpp
113 gui/notifications/toastnotificationsmanager.h
114 gui/reusable/articleamountcontrol.cpp
115 gui/reusable/articleamountcontrol.h
116 gui/reusable/baselineedit.cpp
117 gui/reusable/baselineedit.h
118 gui/reusable/basetreeview.cpp
119 gui/reusable/basetreeview.h
120 gui/reusable/colortoolbutton.cpp
121 gui/reusable/colortoolbutton.h
122 gui/reusable/comboboxwithstatus.cpp
123 gui/reusable/comboboxwithstatus.h
124 gui/reusable/edittableview.cpp
125 gui/reusable/edittableview.h
126 gui/reusable/helpspoiler.cpp
127 gui/reusable/helpspoiler.h
128 gui/reusable/jssyntaxhighlighter.cpp
129 gui/reusable/jssyntaxhighlighter.h
130 gui/reusable/labelsmenu.cpp
131 gui/reusable/labelsmenu.h
132 gui/reusable/labelwithstatus.cpp
133 gui/reusable/labelwithstatus.h
134 gui/reusable/lineeditwithstatus.cpp
135 gui/reusable/lineeditwithstatus.h
136 gui/reusable/locationlineedit.cpp
137 gui/reusable/locationlineedit.h
138 gui/reusable/messagecountspinbox.cpp
139 gui/reusable/messagecountspinbox.h
140 gui/reusable/networkproxydetails.cpp
141 gui/reusable/networkproxydetails.h
142 gui/reusable/nonclosablemenu.cpp
143 gui/reusable/nonclosablemenu.h
144 gui/reusable/plaintoolbutton.cpp
145 gui/reusable/plaintoolbutton.h
146 gui/reusable/progressbarwithtext.cpp
147 gui/reusable/progressbarwithtext.h
148 gui/reusable/resizablestackedwidget.cpp
149 gui/reusable/resizablestackedwidget.h
150 gui/reusable/searchlineedit.cpp
151 gui/reusable/searchlineedit.h
152 gui/reusable/searchtextwidget.cpp
153 gui/reusable/searchtextwidget.h
154 gui/reusable/squeezelabel.cpp
155 gui/reusable/squeezelabel.h
156 gui/reusable/styleditemdelegatewithoutfocus.cpp
157 gui/reusable/styleditemdelegatewithoutfocus.h
158 gui/reusable/timespinbox.cpp
159 gui/reusable/timespinbox.h
160 gui/reusable/treeviewcolumnsmenu.cpp
161 gui/reusable/treeviewcolumnsmenu.h
162 gui/reusable/widgetwithstatus.cpp
163 gui/reusable/widgetwithstatus.h
164 gui/settings/settingsbrowsermail.cpp
165 gui/settings/settingsbrowsermail.h
166 gui/settings/settingsdatabase.cpp
167 gui/settings/settingsdatabase.h
168 gui/settings/settingsdownloads.cpp
169 gui/settings/settingsdownloads.h
170 gui/settings/settingsfeedsmessages.cpp
171 gui/settings/settingsfeedsmessages.h
172 gui/settings/settingsgeneral.cpp
173 gui/settings/settingsgeneral.h
174 gui/settings/settingsgui.cpp
175 gui/settings/settingsgui.h
176 gui/settings/settingslocalization.cpp
177 gui/settings/settingslocalization.h
178 gui/settings/settingsmediaplayer.cpp
179 gui/settings/settingsmediaplayer.h
180 gui/settings/settingsnodejs.cpp
181 gui/settings/settingsnodejs.h
182 gui/settings/settingsnotifications.cpp
183 gui/settings/settingsnotifications.h
184 gui/settings/settingspanel.cpp
185 gui/settings/settingspanel.h
186 gui/settings/settingsshortcuts.cpp
187 gui/settings/settingsshortcuts.h
188 gui/systemtrayicon.cpp
189 gui/systemtrayicon.h
190 gui/tabbar.cpp
191 gui/tabbar.h
192 gui/tabcontent.cpp
193 gui/tabcontent.h
194 gui/tabwidget.cpp
195 gui/tabwidget.h
196 gui/toolbars/basetoolbar.cpp
197 gui/toolbars/basetoolbar.h
198 gui/toolbars/feedstoolbar.cpp
199 gui/toolbars/feedstoolbar.h
200 gui/toolbars/messagestoolbar.cpp
201 gui/toolbars/messagestoolbar.h
202 gui/toolbars/statusbar.cpp
203 gui/toolbars/statusbar.h
204 gui/toolbars/toolbareditor.cpp
205 gui/toolbars/toolbareditor.h
206 gui/webbrowser.cpp
207 gui/webbrowser.h
208 gui/webviewers/webviewer.cpp
209 gui/webviewers/webviewer.h
210 miscellaneous/application.cpp
211 miscellaneous/application.h
212 miscellaneous/autosaver.cpp
213 miscellaneous/autosaver.h
214 miscellaneous/externaltool.cpp
215 miscellaneous/externaltool.h
216 miscellaneous/feedreader.cpp
217 miscellaneous/feedreader.h
218 miscellaneous/iconfactory.cpp
219 miscellaneous/iconfactory.h
220 miscellaneous/iofactory.cpp
221 miscellaneous/iofactory.h
222 miscellaneous/localization.cpp
223 miscellaneous/localization.h
224 miscellaneous/mutex.cpp
225 miscellaneous/mutex.h
226 miscellaneous/nodejs.cpp
227 miscellaneous/nodejs.h
228 miscellaneous/notification.cpp
229 miscellaneous/notification.h
230 miscellaneous/notificationfactory.cpp
231 miscellaneous/notificationfactory.h
232 miscellaneous/pluginfactory.cpp
233 miscellaneous/pluginfactory.h
234 miscellaneous/regexfactory.cpp
235 miscellaneous/regexfactory.h
236 miscellaneous/settings.cpp
237 miscellaneous/settings.h
238 miscellaneous/settingsproperties.h
239 miscellaneous/singleapplication.cpp
240 miscellaneous/singleapplication.h
241 miscellaneous/skinfactory.cpp
242 miscellaneous/skinfactory.h
243 miscellaneous/systemfactory.cpp
244 miscellaneous/systemfactory.h
245 miscellaneous/templates.h
246 miscellaneous/textfactory.cpp
247 miscellaneous/textfactory.h
248 miscellaneous/thread.cpp
249 miscellaneous/thread.h
250 network-web/adblock/adblockdialog.cpp
251 network-web/adblock/adblockdialog.h
252 network-web/adblock/adblockicon.cpp
253 network-web/adblock/adblockicon.h
254 network-web/adblock/adblockmanager.cpp
255 network-web/adblock/adblockmanager.h
256 network-web/adblock/adblockrequestinfo.cpp
257 network-web/adblock/adblockrequestinfo.h
258 network-web/gemini/geminiclient.cpp
259 network-web/gemini/geminiclient.h
260 network-web/gemini/geminiparser.cpp
261 network-web/gemini/geminiparser.h
262 network-web/apiserver.cpp
263 network-web/apiserver.h
264 network-web/articleparse.cpp
265 network-web/articleparse.h
266 network-web/basenetworkaccessmanager.cpp
267 network-web/basenetworkaccessmanager.h
268 network-web/cookiejar.cpp
269 network-web/cookiejar.h
270 network-web/downloader.cpp
271 network-web/downloader.h
272 network-web/downloadmanager.cpp
273 network-web/downloadmanager.h
274 network-web/googlesuggest.cpp
275 network-web/googlesuggest.h
276 network-web/httpresponse.cpp
277 network-web/httpresponse.h
278 network-web/httpserver.cpp
279 network-web/httpserver.h
280 network-web/networkfactory.cpp
281 network-web/networkfactory.h
282 network-web/oauth2service.cpp
283 network-web/oauth2service.h
284 network-web/oauthhttphandler.cpp
285 network-web/oauthhttphandler.h
286 network-web/readability.cpp
287 network-web/readability.h
288 network-web/silentnetworkaccessmanager.cpp
289 network-web/silentnetworkaccessmanager.h
290 network-web/webfactory.cpp
291 network-web/webfactory.h
292 services/abstract/accountcheckmodel.cpp
293 services/abstract/accountcheckmodel.h
294 services/abstract/cacheforserviceroot.cpp
295 services/abstract/cacheforserviceroot.h
296 services/abstract/category.cpp
297 services/abstract/category.h
298 services/abstract/feed.cpp
299 services/abstract/feed.h
300 services/abstract/feedrtlbehavior.h
301 services/abstract/gui/accountdetails.cpp
302 services/abstract/gui/accountdetails.h
303 services/abstract/gui/authenticationdetails.cpp
304 services/abstract/gui/authenticationdetails.h
305 services/abstract/gui/custommessagepreviewer.cpp
306 services/abstract/gui/custommessagepreviewer.h
307 services/abstract/gui/formaccountdetails.cpp
308 services/abstract/gui/formaccountdetails.h
309 services/abstract/gui/formaddeditlabel.cpp
310 services/abstract/gui/formaddeditlabel.h
311 services/abstract/gui/formaddeditprobe.cpp
312 services/abstract/gui/formaddeditprobe.h
313 services/abstract/gui/formcategorydetails.cpp
314 services/abstract/gui/formcategorydetails.h
315 services/abstract/gui/formfeeddetails.cpp
316 services/abstract/gui/formfeeddetails.h
317 services/abstract/gui/httpheadersdetails.cpp
318 services/abstract/gui/httpheadersdetails.h
319 services/abstract/gui/multifeededitcheckbox.cpp
320 services/abstract/gui/multifeededitcheckbox.h
321 services/abstract/importantnode.cpp
322 services/abstract/importantnode.h
323 services/abstract/label.cpp
324 services/abstract/label.h
325 services/abstract/labelsnode.cpp
326 services/abstract/labelsnode.h
327 services/abstract/recyclebin.cpp
328 services/abstract/recyclebin.h
329 services/abstract/rootitem.cpp
330 services/abstract/rootitem.h
331 services/abstract/search.cpp
332 services/abstract/search.h
333 services/abstract/searchsnode.cpp
334 services/abstract/searchsnode.h
335 services/abstract/serviceentrypoint.h
336 services/abstract/serviceroot.cpp
337 services/abstract/serviceroot.h
338 services/abstract/unreadnode.cpp
339 services/abstract/unreadnode.h
340 )
341
342 set(UI_FILES
343 gui/dialogs/formabout.ui
344 gui/dialogs/formaddaccount.ui
345 gui/dialogs/formbackupdatabasesettings.ui
346 gui/dialogs/formdatabasecleanup.ui
347 gui/dialogs/formlog.ui
348 gui/dialogs/formmain.ui
349 gui/dialogs/formmessagefiltersmanager.ui
350 gui/dialogs/formrestoredatabasesettings.ui
351 gui/dialogs/formsettings.ui
352 gui/dialogs/formupdate.ui
353 gui/itemdetails.ui
354 gui/notifications/articlelistnotification.ui
355 gui/notifications/notificationseditor.ui
356 gui/notifications/singlenotificationeditor.ui
357 gui/notifications/toastnotification.ui
358 gui/reusable/articleamountcontrol.ui
359 gui/reusable/networkproxydetails.ui
360 gui/reusable/searchtextwidget.ui
361 gui/settings/settingsbrowsermail.ui
362 gui/settings/settingsdatabase.ui
363 gui/settings/settingsdownloads.ui
364 gui/settings/settingsfeedsmessages.ui
365 gui/settings/settingsgeneral.ui
366 gui/settings/settingsgui.ui
367 gui/settings/settingslocalization.ui
368 gui/settings/settingsmediaplayer.ui
369 gui/settings/settingsnodejs.ui
370 gui/settings/settingsnotifications.ui
371 gui/settings/settingsshortcuts.ui
372 gui/toolbars/toolbareditor.ui
373 network-web/adblock/adblockdialog.ui
374 network-web/downloaditem.ui
375 network-web/downloadmanager.ui
376 services/abstract/gui/accountdetails.ui
377 services/abstract/gui/authenticationdetails.ui
378 services/abstract/gui/formaccountdetails.ui
379 services/abstract/gui/formaddeditlabel.ui
380 services/abstract/gui/formaddeditprobe.ui
381 services/abstract/gui/formcategorydetails.ui
382 services/abstract/gui/formfeeddetails.ui
383 services/abstract/gui/httpheadersdetails.ui
384 )
385
386 if(ENABLE_MEDIAPLAYER)
387 list(APPEND SOURCES
388 gui/mediaplayer/playerbackend.cpp
389 gui/mediaplayer/playerbackend.h
390 gui/mediaplayer/mediaplayer.cpp
391 gui/mediaplayer/mediaplayer.h
392 )
393
394 list(APPEND UI_FILES
395 gui/mediaplayer/mediaplayer.ui
396 )
397 endif()
398
399 if(ENABLE_MEDIAPLAYER_QTMULTIMEDIA)
400 list(APPEND SOURCES
401 gui/mediaplayer/qtmultimedia/qtmultimediabackend.cpp
402 gui/mediaplayer/qtmultimedia/qtmultimediabackend.h
403 )
404 elseif(ENABLE_MEDIAPLAYER_LIBMPV)
405 list(APPEND SOURCES
406 gui/mediaplayer/libmpv/libmpvbackend.cpp
407 gui/mediaplayer/libmpv/libmpvbackend.h
408 gui/mediaplayer/libmpv/libmpvwidget.cpp
409 gui/mediaplayer/libmpv/libmpvwidget.h
410 gui/mediaplayer/libmpv/qthelper.h
411 )
412
413 if(WIN32)
414 # Tweak finding of libs to make it work with official libmpv libs.
415 list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES ".dll.a")
416 endif()
417
418 # Search libmpv.
419 find_library(LibMPV_LIBRARIES
420 NAMES "mpv" "libmpv" "libmpv-v2"
421 HINTS "${LibMPV_ROOT}"
422 NO_CACHE
423 REQUIRED
424 )
425
426 find_path(LibMPV_INCLUDE_DIRS
427 NAMES "mpv/client.h"
428 PATH_SUFFIXES "include"
429 HINTS "${LibMPV_ROOT}"
430 NO_CACHE
431 REQUIRED
432 )
433
434 message(STATUS "Found libmpv: ${LibMPV_LIBRARIES}.")
435 endif()
436
437 if(NO_LITE)
438 list(APPEND SOURCES
439 # WebEngine-based web (and message) browser.
440 gui/webviewers/webengine/webengineviewer.cpp
441 gui/webviewers/webengine/webengineviewer.h
442 network-web/adblock/adblockurlinterceptor.cpp
443 network-web/adblock/adblockurlinterceptor.h
444 network-web/webengine/networkurlinterceptor.cpp
445 network-web/webengine/networkurlinterceptor.h
446 network-web/webengine/urlinterceptor.h
447 network-web/webengine/webenginepage.cpp
448 network-web/webengine/webenginepage.h
449 network-web/gemini/geminischemehandler.cpp
450 network-web/gemini/geminischemehandler.h
451 )
452 endif()
453
454 list(APPEND SOURCES
455 # QTextBrowser.
456 gui/webviewers/qtextbrowser/textbrowserviewer.h
457 gui/webviewers/qtextbrowser/textbrowserviewer.cpp
458 )
459
460 # Add boolinq.
461 list(APPEND SOURCES
462 3rd-party/boolinq/boolinq.h
463 )
464
465 # Add sqlite.
466 if(USE_SYSTEM_SQLITE)
467 find_package(SQLite3)
468
469 if(SQLite3_FOUND)
470 # Include directory and library are linked to below.
471 message(STATUS "Using system SQLite3 ${SQLite3_VERSION}.")
472 else()
473 message(FATAL_ERROR "System SQLite3 not detected. Set USE_SYSTEM_SQLITE=OFF if you want to build with bundled SQLite3.")
474 endif()
475 else()
476 message(STATUS "Using bundled SQLite3.")
477
478 list(APPEND SOURCES
479 3rd-party/sqlite/sqlite3.c
480 3rd-party/sqlite/sqlite3.h
481 )
482
483 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DSQLITE_THREADSAFE=1 -DSQLITE_ENABLE_COLUMN_METADATA=1")
484 endif()
485
486 # Add SimpleCrypt.
487 list(APPEND SOURCES
488 3rd-party/sc/simplecrypt.cpp
489 3rd-party/sc/simplecrypt.h
490 )
491
492 # Deal with .ui files.
493 qt_wrap_ui(SOURCES ${UI_FILES})
494
495 # Bundle resources.
496 qt_add_resources(SOURCES ${CMAKE_SOURCE_DIR}/resources/sql.qrc)
497 qt_add_resources(SOURCES ${CMAKE_SOURCE_DIR}/resources/rssguard.qrc)
498
499 if(APPLE OR WIN32 OR OS2 OR FORCE_BUNDLE_ICONS)
500 qt_add_resources(SOURCES ${CMAKE_SOURCE_DIR}/resources/icons.qrc)
501 endif()
502
503 # Bundle version info.
504 if(WIN32)
505 enable_language("RC")
506 list(APPEND SOURCES "${CMAKE_BINARY_DIR}/rssguard.rc")
507 endif()
508
509 add_library(rssguard SHARED ${SOURCES} ${QM_FILES})
510
511 # Bundle icons on some platforms which do not provide system-wide icon themes.
512 if(FORCE_BUNDLE_ICONS)
513 target_compile_definitions(rssguard
514 PRIVATE
515 FORCE_BUNDLE_ICONS
516 )
517
518 message(STATUS "Forcibly bundling icon themes.")
519 endif()
520
521 target_include_directories(rssguard
522 PUBLIC
523 ${CMAKE_CURRENT_SOURCE_DIR}
524 ${CMAKE_CURRENT_SOURCE_DIR}/gui
525 ${CMAKE_CURRENT_SOURCE_DIR}/gui/dialogs
526 ${CMAKE_CURRENT_SOURCE_DIR}/gui/reusable
527 ${CMAKE_CURRENT_SOURCE_DIR}/services/abstract/gui
528 ${CMAKE_CURRENT_SOURCE_DIR}/dynamic-shortcuts
529
530 PRIVATE
531 ${CMAKE_CURRENT_SOURCE_DIR}/gui/notifications
532 ${CMAKE_CURRENT_SOURCE_DIR}/gui/toolbars
533 ${CMAKE_CURRENT_SOURCE_DIR}/gui/richtexteditor
534 )
535
536 if(SQLite3_FOUND)
537 target_include_directories(rssguard AFTER
538 PRIVATE
539 ${SQLite3_INCLUDE_DIRS}
540 )
541
542 target_compile_definitions(rssguard
543 PRIVATE
544
545 SYSTEM_SQLITE3
546 )
547
548 target_link_libraries(rssguard PRIVATE
549 ${SQLite3_LIBRARIES}
550 )
551 endif()
552
553 # Qt.
554 target_link_libraries(rssguard PUBLIC
555 Qt${QT_VERSION_MAJOR}::Core
556 Qt${QT_VERSION_MAJOR}::Gui
557 Qt${QT_VERSION_MAJOR}::Network
558 Qt${QT_VERSION_MAJOR}::Qml
559 Qt${QT_VERSION_MAJOR}::Sql
560 Qt${QT_VERSION_MAJOR}::Widgets
561 Qt${QT_VERSION_MAJOR}::Xml
562 Qt${QT_VERSION_MAJOR}::Concurrent
563 )
564
565 if(QT_VERSION_MAJOR EQUAL 6)
566 target_link_libraries(rssguard PUBLIC
567 Qt${QT_VERSION_MAJOR}::Core5Compat
568 )
569 endif()
570
571 if(WIN32)
572 target_link_libraries(rssguard PUBLIC
573 Qt${QT_VERSION_MAJOR}::GuiPrivate
574 )
575 endif()
576
577 if(NO_LITE)
578 target_link_libraries(rssguard PUBLIC
579 Qt${QT_VERSION_MAJOR}::WebEngineWidgets
580 )
581 endif()
582
583 if(WIN32 AND NOT BUILD_WITH_QT6)
584 target_link_libraries(rssguard PUBLIC
585 Qt${QT_VERSION_MAJOR}::WinExtras
586 )
587 endif()
588
589 if(NOT OS2)
590 target_link_libraries(rssguard PUBLIC
591 Qt${QT_VERSION_MAJOR}::Multimedia
592 )
593 endif()
594
595 if(ENABLE_MEDIAPLAYER_QTMULTIMEDIA)
596 target_link_libraries(rssguard PUBLIC
597 Qt${QT_VERSION_MAJOR}::OpenGL
598 Qt${QT_VERSION_MAJOR}::MultimediaWidgets
599 )
600 elseif(ENABLE_MEDIAPLAYER_LIBMPV)
601 if(MEDIAPLAYER_FORCE_OPENGL)
602 target_link_libraries(rssguard PUBLIC
603 Qt${QT_VERSION_MAJOR}::OpenGL
604 )
605
606 if(BUILD_WITH_QT6)
607 target_link_libraries(rssguard PUBLIC
608 Qt${QT_VERSION_MAJOR}::OpenGLWidgets
609 )
610 endif()
611 endif()
612
613 target_include_directories(rssguard AFTER
614 PRIVATE
615 ${LibMPV_INCLUDE_DIRS}
616 )
617
618 target_link_libraries(rssguard PUBLIC
619 ${LibMPV_LIBRARIES}
620 )
621 endif()
622
623 if(UNIX AND NOT APPLE AND NOT ANDROID)
624 target_link_libraries(rssguard PUBLIC
625 Qt${QT_VERSION_MAJOR}::DBus
626 )
627 endif()
628
629 if(APPLE)
630 target_link_libraries(rssguard PUBLIC
631 "-framework AppKit"
632 )
633 elseif(WIN32)
634 target_link_libraries(rssguard PUBLIC
635 shell32
636 odbc32
637 )
638 endif()
639
640 if((WIN32 AND NOT BUILD_MSYS2) OR OS2)
641 install(TARGETS rssguard DESTINATION .)
642 set(HEADERS_FOLDER "include/librssguard")
643 elseif((MINGW AND BUILD_MSYS2) OR (UNIX AND NOT APPLE AND NOT ANDROID))
644 include (GNUInstallDirs)
645 install(TARGETS rssguard
646 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
647 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
648 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
649 set(HEADERS_FOLDER "${CMAKE_INSTALL_INCLUDEDIR}/librssguard")
650 elseif(APPLE)
651 install(TARGETS rssguard DESTINATION Contents/MacOS)
652 set(HEADERS_FOLDER "Contents/Resources/Include")
653 endif()
654
655 # Add specific definitions.
656 target_compile_definitions(rssguard
657 PRIVATE
658 RSSGUARD_DLLSPEC=Q_DECL_EXPORT
659 RSSGUARD_LIBDIR="${CMAKE_INSTALL_LIBDIR}"
660 )
661
662 if(LOAD_PLUGINS_FROM_PARENT)
663 target_compile_definitions(rssguard
664 PRIVATE
665 LOAD_PLUGINS_FROM_PARENT
666 )
667 endif()
668
669 # Install public headers.
670 set(HEADERS_ROOT "${PROJECT_SOURCE_DIR}/src/librssguard")
671 file(GLOB_RECURSE HEADER_FILES RELATIVE ${HEADERS_ROOT} "*.h")
672
673 foreach(HEADER_FILE ${HEADER_FILES})
674 #message(${HEADER_FILE})
675 get_filename_component(HEADER_PATH ${HEADER_FILE} DIRECTORY)
676 #message(${HEADER_PATH})
677
678 file(READ ${HEADER_FILE} HEADER_CONTENT)
679 string(FIND "${HEADER_CONTENT}" "RSSGUARD_DLLSPEC" HEADER_EXPORT_IDX)
680
681 if(${HEADER_EXPORT_IDX} GREATER -1)
682 install(FILES ${HEADER_FILE} DESTINATION "${HEADERS_FOLDER}/${HEADER_PATH}")
683 endif()
684 endforeach()