Warning, /network/neochat/src/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 # SPDX-FileCopyrightText: 2020-2021 Carl Schwan <carl@carlschwan.eu>
0002 # SPDX-FileCopyrightText: 2020-2021 Nicolas Fella <nicolas.fella@gmx.de>
0003 # SPDX-FileCopyrightText: 2020-2021 Tobias Fella <tobias.fella@kde.org>
0004 # SPDX-License-Identifier: BSD-2-Clause
0005 
0006 add_library(neochat STATIC
0007     controller.cpp
0008     controller.h
0009     actionshandler.cpp
0010     actionshandler.h
0011     models/emojimodel.cpp
0012     models/emojimodel.h
0013     emojitones.cpp
0014     emojitones.h
0015     models/customemojimodel.cpp
0016     models/customemojimodel.h
0017     clipboard.cpp
0018     clipboard.h
0019     matriximageprovider.cpp
0020     matriximageprovider.h
0021     models/messageeventmodel.cpp
0022     models/messageeventmodel.h
0023     models/messagefiltermodel.cpp
0024     models/messagefiltermodel.h
0025     models/roomlistmodel.cpp
0026     models/roomlistmodel.h
0027     models/sortfilterspacelistmodel.cpp
0028     models/sortfilterspacelistmodel.h
0029     models/accountemoticonmodel.cpp
0030     models/accountemoticonmodel.h
0031     spacehierarchycache.cpp
0032     spacehierarchycache.h
0033     roommanager.cpp
0034     roommanager.h
0035     neochatroom.cpp
0036     neochatroom.h
0037     models/userlistmodel.cpp
0038     models/userlistmodel.h
0039     models/userfiltermodel.cpp
0040     models/userfiltermodel.h
0041     models/publicroomlistmodel.cpp
0042     models/publicroomlistmodel.h
0043     models/spacechildrenmodel.cpp
0044     models/spacechildrenmodel.h
0045     models/spacechildsortfiltermodel.cpp
0046     models/spacechildsortfiltermodel.h
0047     models/spacetreeitem.cpp
0048     models/spacetreeitem.h
0049     models/userdirectorylistmodel.cpp
0050     models/userdirectorylistmodel.h
0051     models/pushrulemodel.cpp
0052     models/pushrulemodel.h
0053     models/emoticonfiltermodel.cpp
0054     models/emoticonfiltermodel.h
0055     notificationsmanager.cpp
0056     notificationsmanager.h
0057     models/sortfilterroomlistmodel.cpp
0058     models/sortfilterroomlistmodel.h
0059     chatdocumenthandler.cpp
0060     chatdocumenthandler.h
0061     models/devicesmodel.cpp
0062     models/devicesmodel.h
0063     models/devicesproxymodel.cpp
0064     filetype.cpp
0065     filetype.h
0066     login.cpp
0067     login.h
0068     models/webshortcutmodel.cpp
0069     models/webshortcutmodel.h
0070     blurhash.cpp
0071     blurhash.h
0072     blurhashimageprovider.cpp
0073     blurhashimageprovider.h
0074     models/mediamessagefiltermodel.cpp
0075     models/mediamessagefiltermodel.h
0076     urlhelper.cpp
0077     urlhelper.h
0078     windowcontroller.cpp
0079     windowcontroller.h
0080     linkpreviewer.cpp
0081     linkpreviewer.h
0082     models/completionmodel.cpp
0083     models/completionmodel.h
0084     models/completionproxymodel.cpp
0085     models/completionproxymodel.h
0086     models/actionsmodel.cpp
0087     models/actionsmodel.h
0088     models/serverlistmodel.cpp
0089     models/serverlistmodel.h
0090     models/statemodel.cpp
0091     models/statemodel.h
0092     models/statefiltermodel.cpp
0093     models/statefiltermodel.h
0094     filetransferpseudojob.cpp
0095     filetransferpseudojob.h
0096     models/searchmodel.cpp
0097     models/searchmodel.h
0098     texthandler.cpp
0099     texthandler.h
0100     logger.cpp
0101     logger.h
0102     models/stickermodel.cpp
0103     models/stickermodel.h
0104     models/imagepacksmodel.cpp
0105     models/imagepacksmodel.h
0106     events/imagepackevent.cpp
0107     events/imagepackevent.h
0108     events/joinrulesevent.cpp
0109     events/joinrulesevent.h
0110     models/reactionmodel.cpp
0111     models/reactionmodel.h
0112     delegatesizehelper.cpp
0113     delegatesizehelper.h
0114     models/livelocationsmodel.cpp
0115     models/livelocationsmodel.h
0116     models/locationsmodel.cpp
0117     models/locationsmodel.h
0118     locationhelper.cpp
0119     locationhelper.h
0120     events/pollevent.cpp
0121     pollhandler.cpp
0122     utils.h
0123     registration.cpp
0124     neochatconnection.cpp
0125     neochatconnection.h
0126     jobs/neochatdeactivateaccountjob.cpp
0127     jobs/neochatdeactivateaccountjob.h
0128     jobs/neochatdeletedevicejob.cpp
0129     jobs/neochatdeletedevicejob.h
0130     jobs/neochatchangepasswordjob.cpp
0131     jobs/neochatchangepasswordjob.h
0132     mediasizehelper.cpp
0133     mediasizehelper.h
0134     eventhandler.cpp
0135     enums/delegatetype.h
0136     roomlastmessageprovider.cpp
0137     roomlastmessageprovider.h
0138     chatbarcache.cpp
0139     chatbarcache.h
0140     colorschemer.cpp
0141     colorschemer.h
0142     models/notificationsmodel.cpp
0143     models/notificationsmodel.h
0144     models/timelinemodel.cpp
0145     models/timelinemodel.h
0146     enums/pushrule.h
0147     models/itinerarymodel.cpp
0148     models/itinerarymodel.h
0149     proxycontroller.cpp
0150     proxycontroller.h
0151     models/linemodel.cpp
0152     models/linemodel.h
0153     events/locationbeaconevent.h
0154     events/serveraclevent.h
0155     events/widgetevent.h
0156 )
0157 
0158 qt_add_qml_module(neochat URI org.kde.neochat NO_PLUGIN
0159     QML_FILES
0160         qml/main.qml
0161         qml/AccountMenu.qml
0162         qml/ExploreComponent.qml
0163         qml/ExploreComponentMobile.qml
0164         qml/ContextMenu.qml
0165         qml/CollapsedRoomDelegate.qml
0166         qml/RoomDelegate.qml
0167         qml/RoomListPage.qml
0168         qml/SpaceListContextMenu.qml
0169         qml/UserInfo.qml
0170         qml/UserInfoDesktop.qml
0171         qml/RoomPage.qml
0172         qml/RoomWindow.qml
0173         qml/ExploreRoomsPage.qml
0174         qml/ManualRoomDialog.qml
0175         qml/ExplorerDelegate.qml
0176         qml/InviteUserPage.qml
0177         qml/ImageEditorPage.qml
0178         qml/WelcomePage.qml
0179         qml/General.qml
0180         qml/RoomSecurity.qml
0181         qml/PushNotification.qml
0182         qml/Categories.qml
0183         qml/Permissions.qml
0184         qml/NeochatMaximizeComponent.qml
0185         qml/FancyEffectsContainer.qml
0186         qml/TypingPane.qml
0187         qml/QuickSwitcher.qml
0188         qml/HoverActions.qml
0189         qml/ChatBar.qml
0190         qml/AttachmentPane.qml
0191         qml/ReplyPane.qml
0192         qml/CompletionMenu.qml
0193         qml/PieProgressBar.qml
0194         qml/QuickFormatBar.qml
0195         qml/RoomData.qml
0196         qml/ServerData.qml
0197         qml/EmojiPicker.qml
0198         qml/TimelineDelegate.qml
0199         qml/ReplyComponent.qml
0200         qml/StateDelegate.qml
0201         qml/RichLabel.qml
0202         qml/MessageDelegate.qml
0203         qml/Bubble.qml
0204         qml/SectionDelegate.qml
0205         qml/VideoDelegate.qml
0206         qml/ReactionDelegate.qml
0207         qml/LinkPreviewDelegate.qml
0208         qml/AudioDelegate.qml
0209         qml/FileDelegate.qml
0210         qml/ImageDelegate.qml
0211         qml/EncryptedDelegate.qml
0212         qml/EventDelegate.qml
0213         qml/TextDelegate.qml
0214         qml/ReadMarkerDelegate.qml
0215         qml/PollDelegate.qml
0216         qml/MimeComponent.qml
0217         qml/StateComponent.qml
0218         qml/MessageEditComponent.qml
0219         qml/AvatarFlow.qml
0220         qml/LoginStep.qml
0221         qml/Login.qml
0222         qml/Homeserver.qml
0223         qml/Username.qml
0224         qml/RegisterPassword.qml
0225         qml/Captcha.qml
0226         qml/Terms.qml
0227         qml/Email.qml
0228         qml/Password.qml
0229         qml/LoginRegister.qml
0230         qml/Loading.qml
0231         qml/LoginMethod.qml
0232         qml/Sso.qml
0233         qml/UserDetailDialog.qml
0234         qml/CreateRoomDialog.qml
0235         qml/EmojiDialog.qml
0236         qml/OpenFileDialog.qml
0237         qml/KeyVerificationDialog.qml
0238         qml/ConfirmLogoutDialog.qml
0239         qml/PowerLevelDialog.qml
0240         qml/Message.qml
0241         qml/EmojiItem.qml
0242         qml/EmojiRow.qml
0243         qml/EmojiSas.qml
0244         qml/ConfirmDeactivateAccountDialog.qml
0245         qml/VerificationCanceled.qml
0246         qml/GlobalMenu.qml
0247         qml/EditMenu.qml
0248         qml/MessageDelegateContextMenu.qml
0249         qml/FileDelegateContextMenu.qml
0250         qml/MessageSourceSheet.qml
0251         qml/ReportSheet.qml
0252         qml/SettingsPage.qml
0253         qml/ThemeRadioButton.qml
0254         qml/ColorScheme.qml
0255         qml/GeneralSettingsPage.qml
0256         qml/EmoticonsPage.qml
0257         qml/EmoticonEditorPage.qml
0258         qml/EmoticonFormCard.qml
0259         qml/GlobalNotificationsPage.qml
0260         qml/NotificationRuleItem.qml
0261         qml/AppearanceSettingsPage.qml
0262         qml/AccountsPage.qml
0263         qml/AccountEditorPage.qml
0264         qml/DevicesPage.qml
0265         qml/DeviceDelegate.qml
0266         qml/DevicesCard.qml
0267         qml/About.qml
0268         qml/AboutKDE.qml
0269         qml/SonnetConfigPage.qml
0270         qml/NetworkProxyPage.qml
0271         qml/DevtoolsPage.qml
0272         qml/ConfirmEncryptionDialog.qml
0273         qml/RemoveSheet.qml
0274         qml/BanSheet.qml
0275         qml/EmojiTonesPicker.qml
0276         qml/EmojiDelegate.qml
0277         qml/EmojiGrid.qml
0278         qml/RoomSearchPage.qml
0279         qml/LocationDelegate.qml
0280         qml/LocationChooser.qml
0281         qml/TimelineView.qml
0282         qml/InvitationView.qml
0283         qml/AvatarTabButton.qml
0284         qml/SpaceDrawer.qml
0285         qml/OsmLocationPlugin.qml
0286         qml/LiveLocationDelegate.qml
0287         qml/FullScreenMap.qml
0288         qml/LocationsPage.qml
0289         qml/LocationMapItem.qml
0290         qml/RoomDrawer.qml
0291         qml/RoomDrawerPage.qml
0292         qml/DirectChatDrawerHeader.qml
0293         qml/GroupChatDrawerHeader.qml
0294         qml/RoomInformation.qml
0295         qml/RoomMedia.qml
0296         qml/ChooseRoomDialog.qml
0297         qml/ShareAction.qml
0298         qml/SpaceHomePage.qml
0299         qml/SpaceHierarchyDelegate.qml
0300         qml/RemoveChildDialog.qml
0301         qml/SelectParentDialog.qml
0302         qml/Security.qml
0303         qml/QrCodeMaximizeComponent.qml
0304         qml/SelectSpacesDialog.qml
0305         qml/AttachDialog.qml
0306         qml/NotificationsView.qml
0307         qml/LoadingDelegate.qml
0308         qml/TimelineEndDelegate.qml
0309         qml/SearchPage.qml
0310         qml/ServerComboBox.qml
0311         qml/UserSearchPage.qml
0312         qml/ManualUserDialog.qml
0313     RESOURCES
0314         qml/confetti.png
0315         qml/glowdot.png
0316 )
0317 
0318 configure_file(config-neochat.h.in ${CMAKE_CURRENT_BINARY_DIR}/config-neochat.h)
0319 
0320 if(WIN32)
0321     set_target_properties(neochat PROPERTIES OUTPUT_NAME "neochatlib")
0322 endif()
0323 
0324 ecm_qt_declare_logging_category(neochat
0325     HEADER "messageeventmodel_logging.h"
0326     IDENTIFIER "MessageEvent"
0327     CATEGORY_NAME "org.kde.neochat.messageeventmodel"
0328     DESCRIPTION "Neochat: messageeventmodel"
0329     DEFAULT_SEVERITY Info
0330     EXPORT NEOCHAT
0331 )
0332 
0333 ecm_qt_declare_logging_category(neochat
0334     HEADER "publicroomlist_logging.h"
0335     IDENTIFIER "PublicRoomList"
0336     CATEGORY_NAME "org.kde.neochat.publicroomlistmodel"
0337     DESCRIPTION "Neochat: publicroomlistmodel"
0338     DEFAULT_SEVERITY Info
0339     EXPORT NEOCHAT
0340 )
0341 
0342 ecm_qt_declare_logging_category(neochat
0343     HEADER "eventhandler_logging.h"
0344     IDENTIFIER "EventHandling"
0345     CATEGORY_NAME "org.kde.neochat.eventhandler"
0346     DEFAULT_SEVERITY Info
0347 )
0348 
0349 ecm_qt_declare_logging_category(neochat
0350     HEADER "chatdocumenthandler_logging.h"
0351     IDENTIFIER "ChatDocumentHandling"
0352     CATEGORY_NAME "org.kde.neochat.chatdocumenthandler"
0353     DEFAULT_SEVERITY Info
0354 )
0355 
0356 add_executable(neochat-app
0357     main.cpp
0358 )
0359 
0360 if(TARGET Qt::WebView)
0361     target_link_libraries(neochat-app PUBLIC Qt::WebView)
0362     target_compile_definitions(neochat-app PUBLIC -DHAVE_WEBVIEW)
0363 endif()
0364 
0365 target_include_directories(neochat-app PRIVATE ${CMAKE_BINARY_DIR})
0366 
0367 target_link_libraries(neochat-app PRIVATE
0368     neochat
0369 )
0370 
0371 ecm_add_app_icon(NEOCHAT_ICON ICONS ${CMAKE_SOURCE_DIR}/128-logo.png)
0372 
0373 target_sources(neochat-app PRIVATE ${NEOCHAT_ICON})
0374 
0375 if(NOT ANDROID)
0376     if (NOT WIN32 AND NOT APPLE)
0377         target_sources(neochat PRIVATE trayicon_sni.cpp trayicon_sni.h)
0378         target_link_libraries(neochat PRIVATE KF6::StatusNotifierItem)
0379     else()
0380         target_sources(neochat PRIVATE trayicon.cpp trayicon.h)
0381     endif()
0382     target_link_libraries(neochat PUBLIC KF6::WindowSystem ICU::uc)
0383     target_compile_definitions(neochat PUBLIC -DHAVE_WINDOWSYSTEM)
0384     target_compile_definitions(neochat PUBLIC -DHAVE_ICU)
0385 endif()
0386 
0387 if (NOT ANDROID AND NOT WIN32 AND NOT APPLE)
0388     target_compile_definitions(neochat PUBLIC -DHAVE_RUNNER)
0389     target_compile_definitions(neochat PUBLIC -DHAVE_X11)
0390     target_sources(neochat PRIVATE runner.cpp)
0391 endif()
0392 
0393 target_include_directories(neochat PRIVATE ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/models ${CMAKE_CURRENT_SOURCE_DIR}/enums)
0394 target_link_libraries(neochat PUBLIC
0395     Qt::Core
0396     Qt::Quick
0397     Qt::Qml
0398     Qt::Gui
0399     Qt::Multimedia
0400     Qt::Network
0401     Qt::QuickControls2
0402     KF6::I18n
0403     KF6::Kirigami
0404     KF6::Notifications
0405     KF6::ConfigCore
0406     KF6::ConfigGui
0407     KF6::CoreAddons
0408     KF6::SonnetCore
0409     KF6::ColorScheme
0410     KF6::ItemModels
0411     QuotientQt6
0412     cmark::cmark
0413     QCoro::Core
0414     QCoro::Network
0415 )
0416 
0417 kconfig_add_kcfg_files(neochat GENERATE_MOC neochatconfig.kcfgc)
0418 
0419 if(NEOCHAT_FLATPAK)
0420     target_compile_definitions(neochat PUBLIC NEOCHAT_FLATPAK)
0421 endif()
0422 
0423 if(ANDROID)
0424     target_sources(neochat PRIVATE notifyrc.qrc)
0425     target_link_libraries(neochat PRIVATE Qt::Svg OpenSSL::SSL)
0426     if(SQLite3_FOUND)
0427         target_link_libraries(neochat-app PRIVATE SQLite::SQLite3)
0428     endif()
0429     target_sources(neochat-app PRIVATE notifyrc.qrc)
0430     target_link_libraries(neochat PUBLIC Qt::Svg OpenSSL::SSL)
0431     kirigami_package_breeze_icons(ICONS
0432         "arrow-down"
0433         "arrow-up"
0434         "checkmark"
0435         "help-about"
0436         "im-user"
0437         "im-invisible-user"
0438         "im-kick-user"
0439         "mail-attachment"
0440         "dialog-cancel"
0441         "preferences-desktop-emoticons"
0442         "document-open"
0443         "document-save"
0444         "document-send"
0445         "dialog-close"
0446         "edit-delete-remove"
0447         "code-context"
0448         "document-edit"
0449         "list-user-add"
0450         "list-add-user"
0451         "user-others"
0452         "media-playback-pause"
0453         "media-playback-start"
0454         "media-playback-stop"
0455         "go-previous"
0456         "go-up"
0457         "go-down"
0458         "list-add"
0459         "irc-join-channel"
0460         "settings-configure"
0461         "configure"
0462         "rating"
0463         "rating-unrated"
0464         "search"
0465         "mail-replied-symbolic"
0466         "edit-clear"
0467         "edit-copy"
0468         "gtk-quit"
0469         "compass"
0470         "computer"
0471         "network-connect"
0472         "list-remove-user"
0473         "org.kde.neochat"
0474         "preferences-system-users"
0475         "preferences-desktop-theme-global"
0476         "notifications"
0477         "notifications-disabled"
0478         "audio-volume-high"
0479         "audio-volume-muted"
0480         "draw-highlight"
0481         "zoom-in"
0482         "zoom-out"
0483         "image-rotate-left-symbolic"
0484         "image-rotate-right-symbolic"
0485         "channel-secure-symbolic"
0486         "download"
0487         "smiley"
0488         "tools-check-spelling"
0489         "username-copy"
0490         "system-switch-user"
0491         "bookmark-new"
0492         "bookmark-remove"
0493         "favorite"
0494         "window-new"
0495         "globe"
0496         "visibility"
0497         "home"
0498         "preferences-desktop-notification"
0499         "computer-symbolic"
0500         "gps"
0501         "system-users-symbolic"
0502         "map-flat"
0503         "documentinfo"
0504         "view-list-details"
0505         "go-previous"
0506         "mail-forward-symbolic"
0507         "dialog-warning-symbolic"
0508         "object-rotate-left"
0509         "object-rotate-right"
0510         "add-subtitle"
0511         "security-low"
0512         "security-low-symbolic"
0513         "kde"
0514         "list-remove-symbolic"
0515         "edit-delete"
0516     )
0517     ecm_add_android_apk(neochat-app ANDROID_DIR ${CMAKE_SOURCE_DIR}/android)
0518 else()
0519     target_link_libraries(neochat PUBLIC Qt::Widgets KF6::KIOWidgets)
0520     install(FILES neochat.notifyrc DESTINATION ${KDE_INSTALL_KNOTIFYRCDIR})
0521 endif()
0522 
0523 if(NOT ANDROID)
0524     set_target_properties(neochat-app PROPERTIES OUTPUT_NAME "neochat")
0525 endif()
0526 
0527 if(TARGET KF6::DBusAddons)
0528     target_link_libraries(neochat PUBLIC KF6::DBusAddons)
0529     target_compile_definitions(neochat PUBLIC -DHAVE_KDBUSADDONS)
0530 endif()
0531 
0532 if (TARGET KF6::KIOWidgets)
0533     target_compile_definitions(neochat PUBLIC -DHAVE_KIO)
0534 endif()
0535 
0536 if (TARGET KUnifiedPush)
0537     target_compile_definitions(neochat PUBLIC -DHAVE_KUNIFIEDPUSH)
0538     target_link_libraries(neochat PUBLIC KUnifiedPush)
0539 
0540     if (NOT ANDROID)
0541         configure_file(org.kde.neochat.service.in ${CMAKE_CURRENT_BINARY_DIR}/org.kde.neochat.service)
0542         install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.kde.neochat.service DESTINATION ${KDE_INSTALL_DBUSSERVICEDIR})
0543     endif()
0544 endif()
0545 
0546 install(TARGETS neochat-app ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
0547 
0548 if (NOT ANDROID AND NOT WIN32 AND NOT APPLE)
0549     install(FILES plasma-runner-neochat.desktop DESTINATION ${KDE_INSTALL_DATAROOTDIR}/krunner/dbusplugins)
0550 endif()