Warning, /network/tokodon/src/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 # SPDX-FileCopyrightText: 2021 Carl Schwan <carlschwan@kde.org> 0002 # SPDX-License-Identifier: BSD-2-Clause 0003 0004 add_library(tokodon_static STATIC ) 0005 0006 ecm_qt_declare_logging_category(tokodon_static 0007 HEADER tokodon_debug.h 0008 IDENTIFIER TOKODON_LOG 0009 CATEGORY_NAME org.kde.tokodon 0010 DESCRIPTION "tokodon" 0011 DEFAULT_SEVERITY Warning 0012 EXPORT TOKODON 0013 ) 0014 0015 ecm_qt_declare_logging_category(tokodon_static 0016 HEADER tokodon_http_debug.h 0017 IDENTIFIER TOKODON_HTTP 0018 CATEGORY_NAME org.kde.tokodon.http 0019 DESCRIPTION "Tokodon request" 0020 EXPORT TOKODON 0021 ) 0022 0023 target_sources(tokodon_static 0024 PRIVATE 0025 # Account 0026 account/abstractaccount.cpp 0027 account/abstractaccount.h 0028 account/accountmanager.cpp 0029 account/accountmanager.h 0030 account/account.cpp 0031 account/account.h 0032 account/preferences.cpp 0033 account/preferences.h 0034 account/identity.cpp 0035 account/identity.h 0036 account/socialgraphmodel.cpp 0037 account/socialgraphmodel.h 0038 account/relationship.cpp 0039 account/profileeditor.cpp 0040 account/notificationhandler.cpp 0041 account/notificationhandler.h 0042 0043 # Editor 0044 editor/posteditorbackend.cpp 0045 editor/posteditorbackend.h 0046 editor/attachmenteditormodel.cpp 0047 editor/attachmenteditormodel.h 0048 editor/polltimemodel.cpp 0049 editor/polltimemodel.h 0050 editor/languagemodel.cpp 0051 editor/languagemodel.h 0052 editor/polleditorbackend.cpp 0053 editor/polleditorbackend.h 0054 0055 # Conversation view 0056 conversation/conversationmodel.cpp 0057 conversation/conversationmodel.h 0058 0059 # Timeline 0060 timeline/post.cpp 0061 timeline/post.h 0062 timeline/poll.cpp 0063 timeline/poll.h 0064 timeline/tag.h 0065 timeline/tag.cpp 0066 timeline/accountmodel.cpp 0067 timeline/accountmodel.h 0068 timeline/threadmodel.cpp 0069 timeline/threadmodel.h 0070 timeline/timelinemodel.cpp 0071 timeline/timelinemodel.h 0072 timeline/notificationmodel.cpp 0073 timeline/notificationmodel.h 0074 timeline/tagstimelinemodel.cpp 0075 timeline/tagstimelinemodel.h 0076 timeline/maintimelinemodel.cpp 0077 timeline/maintimelinemodel.h 0078 timeline/notificationmodel.cpp 0079 timeline/notificationmodel.h 0080 timeline/abstracttimelinemodel.cpp 0081 timeline/abstracttimelinemodel.h 0082 timeline/tagsmodel.h 0083 timeline/tagsmodel.cpp 0084 timeline/abstractlistmodel.cpp 0085 timeline/abstractlistmodel.h 0086 0087 # Search 0088 search/searchmodel.cpp 0089 search/searchmodel.h 0090 0091 # Misc utils 0092 utils/blurhash.cpp 0093 utils/blurhash.hpp 0094 utils/blurhashimageprovider.cpp 0095 utils/blurhashimageprovider.h 0096 utils/filehelper.cpp 0097 utils/filehelper.h 0098 utils/filetransferjob.cpp 0099 utils/filetransferjob.h 0100 utils/clipboard.cpp 0101 utils/clipboard.h 0102 utils/messagefiltercontainer.cpp 0103 utils/messagefiltercontainer.h 0104 utils/mpvplayer.cpp 0105 utils/mpvplayer.h 0106 utils/qthelper.hpp 0107 utils/utils.cpp 0108 utils/utils.h 0109 0110 # Network related classes 0111 network/networkrequestprogress.cpp 0112 network/networkrequestprogress.h 0113 network/networkaccessmanagerfactory.cpp 0114 network/networkaccessmanagerfactory.h 0115 network/networkcontroller.cpp 0116 network/networkcontroller.h 0117 0118 # Admin 0119 admin/accounttoolmodel.cpp 0120 admin/accounttoolmodel.h 0121 admin/adminaccountinfo.cpp 0122 admin/adminaccountinfo.h 0123 admin/federationtoolmodel.cpp 0124 admin/federationtoolmodel.h 0125 admin/federationinfo.h 0126 admin/federationinfo.cpp 0127 ) 0128 0129 if(NOT ANDROID) 0130 target_sources(tokodon_static 0131 PRIVATE 0132 utils/colorschemer.cpp 0133 utils/colorschemer.h 0134 ) 0135 endif() 0136 0137 kconfig_add_kcfg_files(tokodon_static GENERATE_MOC config.kcfgc accountconfig.kcfgc) 0138 target_link_libraries(tokodon_static PUBLIC Qt::Quick Qt::Qml Qt::Gui Qt::Network Qt::WebSockets 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 ${QTKEYCHAIN_LIBRARIES} ${MPV_LIBRARIES}) 0139 target_include_directories(tokodon_static PUBLIC ${MPV_INCLUDE_DIRS}) 0140 target_compile_options(tokodon_static PUBLIC ${MPV_CFLAGS_OTHER} -fexceptions) 0141 target_link_directories(tokodon_static PUBLIC ${MPV_LIBRARY_DIRS}) 0142 0143 if (TARGET KF${QT_MAJOR_VERSION}::KIOWidgets) 0144 target_compile_definitions(tokodon_static PUBLIC -DHAVE_KIO) 0145 target_link_libraries(tokodon_static PUBLIC KF${QT_MAJOR_VERSION}::KIOWidgets) 0146 endif() 0147 0148 if (SAILFISHOS) 0149 target_compile_definitions(tokodon_static PUBLIC -DSAILFISHOS) 0150 endif() 0151 0152 if(TOKODON_FLATPAK) 0153 target_compile_definitions(tokodon_static PUBLIC TOKODON_FLATPAK) 0154 endif() 0155 0156 if (BUILD_TESTING) 0157 add_subdirectory(autotests) 0158 endif() 0159 0160 add_executable(tokodon 0161 main.cpp 0162 resources.qrc 0163 ) 0164 0165 target_include_directories(tokodon PRIVATE ${CMAKE_BINARY_DIR}) 0166 target_link_libraries(tokodon PRIVATE tokodon_static) 0167 0168 if(ANDROID) 0169 target_sources(tokodon PRIVATE androidresources.qrc) 0170 target_link_libraries(tokodon PRIVATE Qt::Svg OpenSSL::SSL) 0171 kirigami_package_breeze_icons(ICONS 0172 "help-about" 0173 "im-user" 0174 "im-invisible-user" 0175 "im-kick-user" 0176 "mail-attachment" 0177 "mail-attachment-symbolic" 0178 "dialog-cancel" 0179 "preferences-desktop-emoticons" 0180 "document-open" 0181 "document-save" 0182 "document-send" 0183 "dialog-close" 0184 "edit-delete-remove" 0185 "code-context" 0186 "document-edit" 0187 "list-user-add" 0188 "list-add-user" 0189 "user-others" 0190 "media-playback-pause" 0191 "media-playback-start" 0192 "go-up" 0193 "go-down" 0194 "list-add" 0195 "irc-join-channel" 0196 "settings-configure" 0197 "configure" 0198 "rating" 0199 "rating-unrated" 0200 "search" 0201 "mail-replied-symbolic" 0202 "edit-copy" 0203 "gtk-quit" 0204 "compass" 0205 "network-connect" 0206 "notifications" 0207 "kstars_xplanet" 0208 "kstars_planets" 0209 "system-users" 0210 "go-home-large" 0211 "view-hidden" 0212 "favorite" 0213 "cell_edit" 0214 "office-chart-bar" 0215 "im-ban-kick-user" 0216 "user-group-properties" 0217 "microphone-sensitivity-muted" 0218 "cards-block" 0219 "system-search" 0220 "bookmarks" 0221 "checkmark" 0222 "lock" 0223 "edit-clear" 0224 "approved" 0225 "delete" 0226 "user-identity" 0227 "download" 0228 "edit-reset" 0229 "dialog-ok" 0230 "gnumeric-graphguru" 0231 "mail-message" 0232 "bookmark-new" 0233 "window-unpin" 0234 "pin" 0235 "edit-entry" 0236 "edit-cut" 0237 "system-switch-user" 0238 ) 0239 else() 0240 target_sources(tokodon PRIVATE desktopresources.qrc) 0241 target_link_libraries(tokodon PRIVATE Qt::Widgets) 0242 target_compile_definitions(tokodon PRIVATE -DHAVE_COLORSCHEME) 0243 target_link_libraries(tokodon_static PUBLIC KF${QT_MAJOR_VERSION}::ConfigWidgets) 0244 endif() 0245 0246 if (TARGET KF${QT_MAJOR_VERSION}::DBusAddons) 0247 target_link_libraries(tokodon PRIVATE KF${QT_MAJOR_VERSION}::DBusAddons KF${QT_MAJOR_VERSION}::WindowSystem) 0248 target_compile_definitions(tokodon PRIVATE -DHAVE_KDBUSADDONS) 0249 endif () 0250 0251 if(ANDROID) 0252 target_sources(tokodon PRIVATE notifyrc.qrc) 0253 else() 0254 install(FILES tokodon.notifyrc DESTINATION ${KDE_INSTALL_KNOTIFYRCDIR}) 0255 endif() 0256 0257 install(TARGETS tokodon ${KF${QT_MAJOR_VERSION}_INSTALL_TARGETS_DEFAULT_ARGS})