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 configure_file(qml/Page/RoomList/RoomDelegate.qml ${CMAKE_CURRENT_BINARY_DIR}/qml/Page/RoomList/RoomDelegate.qml)
0007 configure_file(qml/Component/QuickSwitcher.qml ${CMAKE_CURRENT_BINARY_DIR}/qml/Component/QuickSwitcher.qml)
0008 configure_file(qml/Dialog/UserDetailDialog.qml ${CMAKE_CURRENT_BINARY_DIR}/qml/Dialog/UserDetailDialog.qml)
0009 configure_file(qml/Dialog/PowerLevelDialog.qml ${CMAKE_CURRENT_BINARY_DIR}/qml/Dialog/PowerLevelDialog.qml)
0010 configure_file(qml/Component/Timeline/AudioDelegate.qml ${CMAKE_CURRENT_BINARY_DIR}/qml/Component/Timeline/AudioDelegate.qml)
0011 configure_file(qml/Component/Timeline/VideoDelegate.qml ${CMAKE_CURRENT_BINARY_DIR}/qml/Component/Timeline/VideoDelegate.qml)
0012 configure_file(qml/Component/Timeline/OsmLocationPlugin.qml ${CMAKE_CURRENT_BINARY_DIR}/qml/Component/Timeline/OsmLocationPlugin.qml)
0013 
0014 configure_file(res.qrc ${CMAKE_CURRENT_SOURCE_DIR}/res.generated.qrc)
0015 
0016 add_library(neochat STATIC
0017     controller.cpp
0018     controller.h
0019     actionshandler.cpp
0020     actionshandler.h
0021     models/emojimodel.cpp
0022     models/emojimodel.h
0023     emojitones.cpp
0024     emojitones.h
0025     models/customemojimodel.cpp
0026     models/customemojimodel.h
0027     clipboard.cpp
0028     clipboard.h
0029     matriximageprovider.cpp
0030     matriximageprovider.h
0031     models/messageeventmodel.cpp
0032     models/messageeventmodel.h
0033     models/messagefiltermodel.cpp
0034     models/messagefiltermodel.h
0035     models/roomlistmodel.cpp
0036     models/roomlistmodel.h
0037     models/sortfilterspacelistmodel.cpp
0038     models/sortfilterspacelistmodel.h
0039     models/accountemoticonmodel.cpp
0040     models/accountemoticonmodel.h
0041     spacehierarchycache.cpp
0042     spacehierarchycache.h
0043     roommanager.cpp
0044     roommanager.h
0045     neochatroom.cpp
0046     neochatroom.h
0047     neochatuser.cpp
0048     neochatuser.h
0049     models/userlistmodel.cpp
0050     models/userlistmodel.h
0051     models/userfiltermodel.cpp
0052     models/userfiltermodel.h
0053     models/publicroomlistmodel.cpp
0054     models/publicroomlistmodel.h
0055     models/userdirectorylistmodel.cpp
0056     models/userdirectorylistmodel.h
0057     models/pushrulemodel.cpp
0058     models/pushrulemodel.h
0059     models/emoticonfiltermodel.cpp
0060     models/emoticonfiltermodel.h
0061     notificationsmanager.cpp
0062     notificationsmanager.h
0063     models/sortfilterroomlistmodel.cpp
0064     models/sortfilterroomlistmodel.h
0065     chatdocumenthandler.cpp
0066     chatdocumenthandler.h
0067     models/devicesmodel.cpp
0068     models/devicesmodel.h
0069     models/devicesproxymodel.cpp
0070     filetypesingleton.cpp
0071     filetypesingleton.h
0072     login.cpp
0073     login.h
0074     models/webshortcutmodel.cpp
0075     models/webshortcutmodel.h
0076     blurhash.cpp
0077     blurhash.h
0078     blurhashimageprovider.cpp
0079     blurhashimageprovider.h
0080     models/collapsestateproxymodel.cpp
0081     models/collapsestateproxymodel.h
0082     models/mediamessagefiltermodel.cpp
0083     models/mediamessagefiltermodel.h
0084     urlhelper.cpp
0085     urlhelper.h
0086     windowcontroller.cpp
0087     windowcontroller.h
0088     linkpreviewer.cpp
0089     linkpreviewer.h
0090     models/completionmodel.cpp
0091     models/completionmodel.h
0092     models/completionproxymodel.cpp
0093     models/completionproxymodel.h
0094     models/actionsmodel.cpp
0095     models/actionsmodel.h
0096     models/serverlistmodel.cpp
0097     models/serverlistmodel.h
0098     models/statemodel.cpp
0099     models/statemodel.h
0100     models/statefiltermodel.cpp
0101     models/statefiltermodel.h
0102     filetransferpseudojob.cpp
0103     filetransferpseudojob.h
0104     models/searchmodel.cpp
0105     models/searchmodel.h
0106     texthandler.cpp
0107     texthandler.h
0108     logger.cpp
0109     logger.h
0110     models/stickermodel.cpp
0111     models/stickermodel.h
0112     models/imagepacksmodel.cpp
0113     models/imagepacksmodel.h
0114     events/imagepackevent.cpp
0115     events/imagepackevent.h
0116     events/joinrulesevent.cpp
0117     events/joinrulesevent.h
0118     models/reactionmodel.cpp
0119     models/reactionmodel.h
0120     delegatesizehelper.cpp
0121     delegatesizehelper.h
0122     models/livelocationsmodel.cpp
0123     models/livelocationsmodel.h
0124     models/locationsmodel.cpp
0125     models/locationsmodel.h
0126     locationhelper.cpp
0127     locationhelper.h
0128     events/pollevent.cpp
0129     pollhandler.cpp
0130 )
0131 
0132 ecm_qt_declare_logging_category(neochat
0133     HEADER "messageeventmodel_logging.h"
0134     IDENTIFIER "MessageEvent"
0135     CATEGORY_NAME "org.kde.neochat.messageeventmodel"
0136     DESCRIPTION "Neochat: messageeventmodel"
0137     DEFAULT_SEVERITY Info
0138     EXPORT NEOCHAT
0139 )
0140 
0141 add_executable(neochat-app
0142     main.cpp
0143     ${CMAKE_CURRENT_SOURCE_DIR}/res.generated.qrc
0144 )
0145 
0146 target_include_directories(neochat-app PRIVATE ${CMAKE_BINARY_DIR})
0147 
0148 target_link_libraries(neochat-app PRIVATE
0149     neochat
0150 )
0151 
0152 ecm_add_app_icon(NEOCHAT_ICON ICONS ${CMAKE_SOURCE_DIR}/128-logo.png)
0153 
0154 target_sources(neochat-app PRIVATE ${NEOCHAT_ICON})
0155 
0156 if(NOT ANDROID)
0157     target_sources(neochat PRIVATE colorschemer.cpp colorschemer.h)
0158     if (NOT WIN32 AND NOT APPLE)
0159         target_sources(neochat PRIVATE trayicon_sni.cpp trayicon_sni.h)
0160     else()
0161         target_sources(neochat PRIVATE trayicon.cpp trayicon.h)
0162     endif()
0163     target_link_libraries(neochat PUBLIC KF${QT_MAJOR_VERSION}::ConfigWidgets KF${QT_MAJOR_VERSION}::WindowSystem)
0164     target_compile_definitions(neochat PUBLIC -DHAVE_COLORSCHEME)
0165     target_compile_definitions(neochat PUBLIC -DHAVE_WINDOWSYSTEM)
0166 endif()
0167 
0168 if (NOT ANDROID AND NOT WIN32 AND NOT APPLE)
0169     target_sources(neochat-app PRIVATE res_desktop.qrc)
0170     target_compile_definitions(neochat PUBLIC -DHAVE_RUNNER)
0171     target_compile_definitions(neochat PUBLIC -DHAVE_X11)
0172     target_sources(neochat PRIVATE runner.cpp)
0173 else()
0174     target_sources(neochat-app PRIVATE res_android.qrc)
0175 endif()
0176 
0177 target_include_directories(neochat PRIVATE ${CMAKE_BINARY_DIR})
0178 target_link_libraries(neochat PUBLIC Qt::Core Qt::Quick Qt::Qml Qt::Gui Qt::Multimedia Qt::Network Qt::QuickControls2 KF${QT_MAJOR_VERSION}::I18n KF${QT_MAJOR_VERSION}::Kirigami2 KF${QT_MAJOR_VERSION}::Notifications KF${QT_MAJOR_VERSION}::ConfigCore KF${QT_MAJOR_VERSION}::ConfigGui KF${QT_MAJOR_VERSION}::CoreAddons KF${QT_MAJOR_VERSION}::SonnetCore  KF${QT_MAJOR_VERSION}::ItemModels Quotient${QUOTIENT_SUFFIX} cmark::cmark ${QTKEYCHAIN_LIBRARIES} QCoro::Core)
0179 kconfig_add_kcfg_files(neochat GENERATE_MOC neochatconfig.kcfgc)
0180 
0181 if(NEOCHAT_FLATPAK)
0182     target_compile_definitions(neochat PUBLIC NEOCHAT_FLATPAK)
0183 endif()
0184 
0185 if(ANDROID)
0186     target_sources(neochat PRIVATE notifyrc.qrc)
0187     target_link_libraries(neochat PRIVATE Qt::Svg OpenSSL::SSL)
0188     if(SQLite3_FOUND)
0189         target_link_libraries(neochat-app PRIVATE SQLite::SQLite3)
0190     endif()
0191     target_sources(neochat-app PRIVATE notifyrc.qrc)
0192     target_link_libraries(neochat PUBLIC Qt::Svg OpenSSL::SSL)
0193     kirigami_package_breeze_icons(ICONS
0194         "arrow-down"
0195         "arrow-up"
0196         "checkmark"
0197         "help-about"
0198         "im-user"
0199         "im-invisible-user"
0200         "im-kick-user"
0201         "mail-attachment"
0202         "dialog-cancel"
0203         "preferences-desktop-emoticons"
0204         "document-open"
0205         "document-save"
0206         "document-send"
0207         "dialog-close"
0208         "edit-delete-remove"
0209         "code-context"
0210         "document-edit"
0211         "list-user-add"
0212         "list-add-user"
0213         "user-others"
0214         "media-playback-pause"
0215         "media-playback-start"
0216         "media-playback-stop"
0217         "go-previous"
0218         "go-up"
0219         "go-down"
0220         "list-add"
0221         "irc-join-channel"
0222         "settings-configure"
0223         "configure"
0224         "rating"
0225         "rating-unrated"
0226         "search"
0227         "mail-replied-symbolic"
0228         "edit-clear"
0229         "edit-copy"
0230         "gtk-quit"
0231         "compass"
0232         "computer"
0233         "network-connect"
0234         "list-remove-user"
0235         "org.kde.neochat"
0236         "preferences-system-users"
0237         "preferences-desktop-theme-global"
0238         "notifications"
0239         "notifications-disabled"
0240         "audio-volume-high"
0241         "audio-volume-muted"
0242         "draw-highlight"
0243         "zoom-in"
0244         "zoom-out"
0245         "image-rotate-left-symbolic"
0246         "image-rotate-right-symbolic"
0247         "channel-secure-symbolic"
0248         "download"
0249         "smiley"
0250         "tools-check-spelling"
0251         "username-copy"
0252         "system-switch-user"
0253         "bookmark-new"
0254         "bookmark-remove"
0255         "favorite"
0256         "window-new"
0257         "globe"
0258         "visibility"
0259         "home"
0260         "preferences-desktop-notification"
0261         "computer-symbolic"
0262         "gps"
0263     )
0264 else()
0265     target_link_libraries(neochat PUBLIC Qt::Widgets KF${QT_MAJOR_VERSION}::KIOWidgets)
0266     install(FILES neochat.notifyrc DESTINATION ${KDE_INSTALL_KNOTIFYRCDIR})
0267 endif()
0268 
0269 if(NOT ANDROID)
0270     set_target_properties(neochat-app PROPERTIES OUTPUT_NAME "neochat")
0271 endif()
0272 
0273 if(TARGET KF${QT_MAJOR_VERSION}::DBusAddons)
0274     target_link_libraries(neochat PUBLIC KF${QT_MAJOR_VERSION}::DBusAddons)
0275     target_compile_definitions(neochat PUBLIC -DHAVE_KDBUSADDONS)
0276 endif()
0277 
0278 if (TARGET KF${QT_MAJOR_VERSION}::KIOWidgets)
0279     target_compile_definitions(neochat PUBLIC -DHAVE_KIO)
0280 endif()
0281 
0282 install(TARGETS neochat-app ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
0283 
0284 if (NOT ANDROID AND NOT WIN32 AND NOT APPLE)
0285     install(FILES plasma-runner-neochat.desktop DESTINATION ${KDE_INSTALL_DATAROOTDIR}/krunner/dbusplugins)
0286 endif()
0287