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 qt_add_qml_module(tokodon_static 0005 STATIC 0006 URI org.kde.tokodon 0007 VERSION 1.0) 0008 0009 ecm_qt_declare_logging_category(tokodon_static 0010 HEADER tokodon_debug.h 0011 IDENTIFIER TOKODON_LOG 0012 CATEGORY_NAME org.kde.tokodon 0013 DESCRIPTION "tokodon" 0014 DEFAULT_SEVERITY Warning 0015 EXPORT TOKODON 0016 ) 0017 0018 ecm_qt_declare_logging_category(tokodon_static 0019 HEADER tokodon_http_debug.h 0020 IDENTIFIER TOKODON_HTTP 0021 CATEGORY_NAME org.kde.tokodon.http 0022 DESCRIPTION "Tokodon request" 0023 EXPORT TOKODON 0024 ) 0025 0026 target_sources(tokodon_static 0027 PRIVATE 0028 # Account 0029 account/abstractaccount.cpp 0030 account/abstractaccount.h 0031 account/accountmanager.cpp 0032 account/accountmanager.h 0033 account/account.cpp 0034 account/account.h 0035 account/preferences.cpp 0036 account/preferences.h 0037 account/identity.cpp 0038 account/identity.h 0039 account/socialgraphmodel.cpp 0040 account/socialgraphmodel.h 0041 account/relationship.cpp 0042 account/profileeditor.cpp 0043 account/notificationhandler.cpp 0044 account/notificationhandler.h 0045 0046 # Editor 0047 editor/posteditorbackend.cpp 0048 editor/posteditorbackend.h 0049 editor/attachmenteditormodel.cpp 0050 editor/attachmenteditormodel.h 0051 editor/polltimemodel.cpp 0052 editor/polltimemodel.h 0053 editor/languagemodel.cpp 0054 editor/languagemodel.h 0055 editor/polleditorbackend.cpp 0056 editor/polleditorbackend.h 0057 0058 # Conversation view 0059 conversation/conversationmodel.cpp 0060 conversation/conversationmodel.h 0061 0062 # Timeline 0063 timeline/post.cpp 0064 timeline/post.h 0065 timeline/poll.cpp 0066 timeline/poll.h 0067 timeline/tag.h 0068 timeline/tag.cpp 0069 timeline/accountmodel.cpp 0070 timeline/accountmodel.h 0071 timeline/threadmodel.cpp 0072 timeline/threadmodel.h 0073 timeline/timelinemodel.cpp 0074 timeline/timelinemodel.h 0075 timeline/tagstimelinemodel.cpp 0076 timeline/tagstimelinemodel.h 0077 timeline/maintimelinemodel.cpp 0078 timeline/maintimelinemodel.h 0079 timeline/abstracttimelinemodel.cpp 0080 timeline/abstracttimelinemodel.h 0081 timeline/tagsmodel.h 0082 timeline/tagsmodel.cpp 0083 timeline/abstractlistmodel.cpp 0084 timeline/abstractlistmodel.h 0085 0086 # Search 0087 search/searchmodel.cpp 0088 search/searchmodel.h 0089 0090 # Misc utils 0091 utils/blurhash.cpp 0092 utils/blurhash.hpp 0093 utils/blurhashimageprovider.cpp 0094 utils/blurhashimageprovider.h 0095 utils/filehelper.cpp 0096 utils/filehelper.h 0097 utils/filetransferjob.cpp 0098 utils/filetransferjob.h 0099 utils/clipboard.cpp 0100 utils/clipboard.h 0101 utils/navigation.cpp 0102 utils/navigation.h 0103 utils/emojimodel.cpp 0104 utils/emojimodel.h 0105 utils/emojis.h 0106 utils/emojitones.cpp 0107 utils/emojitones.h 0108 utils/emojitones_data.h 0109 utils/messagefiltercontainer.cpp 0110 utils/messagefiltercontainer.h 0111 utils/mpvplayer.cpp 0112 utils/mpvplayer.h 0113 utils/qthelper.hpp 0114 utils/utils.cpp 0115 utils/utils.h 0116 utils/colorschemer.cpp 0117 utils/colorschemer.h 0118 0119 # Network related classes 0120 network/networkrequestprogress.cpp 0121 network/networkrequestprogress.h 0122 network/networkaccessmanagerfactory.cpp 0123 network/networkaccessmanagerfactory.h 0124 network/networkcontroller.cpp 0125 network/networkcontroller.h 0126 0127 # Admin 0128 admin/accounttoolmodel.cpp 0129 admin/accounttoolmodel.h 0130 admin/adminaccountinfo.cpp 0131 admin/adminaccountinfo.h 0132 admin/federationtoolmodel.cpp 0133 admin/federationtoolmodel.h 0134 admin/federationinfo.h 0135 admin/federationinfo.cpp 0136 admin/ipinfo.cpp 0137 admin/ipinfo.h 0138 admin/iprulestoolmodel.cpp 0139 admin/iprulestoolmodel.h 0140 admin/emailblocktoolmodel.cpp 0141 admin/emailblocktoolmodel.h 0142 admin/emailinfo.cpp 0143 admin/emailinfo.h 0144 0145 # Notification models 0146 notification/notificationgroupingmodel.cpp 0147 notification/notificationgroupingmodel.h 0148 notification/notificationmodel.cpp 0149 notification/notificationmodel.h 0150 ) 0151 0152 qt_target_qml_sources(tokodon_static 0153 QML_FILES 0154 # Components 0155 content/ui/Components/Emoji/EmojiDelegate.qml 0156 content/ui/Components/Emoji/EmojiGrid.qml 0157 content/ui/Components/Emoji/EmojiPicker.qml 0158 content/ui/Components/Emoji/EmojiTonesPicker.qml 0159 content/ui/Components/FocusedImage.qml 0160 content/ui/Components/PopupShadow.qml 0161 content/ui/Components/UserCard.qml 0162 0163 # Moderation Tools 0164 content/ui/ModerationTools/AccountToolPage.qml 0165 content/ui/ModerationTools/EmailBlockToolPage.qml 0166 content/ui/ModerationTools/FederationToolPage.qml 0167 content/ui/ModerationTools/IpRulePage.qml 0168 content/ui/ModerationTools/MainAccountToolPage.qml 0169 content/ui/ModerationTools/MainFederationToolPage.qml 0170 content/ui/ModerationTools/MainIpRulePage.qml 0171 content/ui/ModerationTools/ModerationToolPage.qml 0172 0173 # Notifications 0174 content/ui/Notifications/GroupInteractionLabel.qml 0175 content/ui/Notifications/UserInteractionLabel.qml 0176 0177 # Settings 0178 content/ui/Settings/AboutKDEPage.qml 0179 content/ui/Settings/AboutPage.qml 0180 content/ui/Settings/AccountsPage.qml 0181 content/ui/Settings/AppearancePage.qml 0182 content/ui/Settings/NetworkProxyPage.qml 0183 content/ui/Settings/NotificationsPage.qml 0184 content/ui/Settings/ProfileEditor.qml 0185 content/ui/Settings/SettingsPage.qml 0186 content/ui/Settings/SonnetPage.qml 0187 0188 # Composer 0189 content/ui/StatusComposer/EditorAttachmentGrid.qml 0190 content/ui/StatusComposer/AttachmentInfoDialog.qml 0191 content/ui/StatusComposer/ComposerPoll.qml 0192 content/ui/StatusComposer/EmojiDialog.qml 0193 content/ui/StatusComposer/StatusComposer.qml 0194 content/ui/StatusComposer/StatusPreview.qml 0195 0196 # Delegate 0197 content/ui/StatusDelegate/AttachmentGrid.qml 0198 content/ui/StatusDelegate/InlineIdentityInfo.qml 0199 content/ui/StatusDelegate/InteractionButton.qml 0200 content/ui/StatusDelegate/LinkPreview.qml 0201 content/ui/StatusDelegate/MediaContainer.qml 0202 content/ui/StatusDelegate/OverflowMenu.qml 0203 content/ui/StatusDelegate/PostContent.qml 0204 content/ui/StatusDelegate/StatusDelegate.qml 0205 content/ui/StatusDelegate/StatusPoll.qml 0206 content/ui/StatusDelegate/UserInteractionLabel.qml 0207 content/ui/StatusDelegate/VideoAttachment.qml 0208 0209 # Other 0210 content/ui/AccountInfo.qml 0211 content/ui/AuthorizationPage.qml 0212 content/ui/ConversationDelegate.qml 0213 content/ui/ConversationPage.qml 0214 content/ui/ExplorePage.qml 0215 content/ui/FollowDelegate.qml 0216 content/ui/FullScreenImage.qml 0217 content/ui/LanguageSelector.qml 0218 content/ui/LoginPage.qml 0219 content/ui/Main.qml 0220 content/ui/MastoPage.qml 0221 content/ui/NotificationPage.qml 0222 content/ui/SearchField.qml 0223 content/ui/SearchPage.qml 0224 content/ui/SearchView.qml 0225 content/ui/ShareDialog.qml 0226 content/ui/SocialGraphPage.qml 0227 content/ui/StandaloneComposer.qml 0228 content/ui/ThreadPage.qml 0229 content/ui/TimelinePage.qml 0230 content/ui/UserInfo.qml 0231 ) 0232 qt_target_qml_sources(tokodon_static 0233 PREFIX / 0234 RESOURCES 0235 content/elephant.svg 0236 icons/tokodon/scalable/post-bookmarked.svg 0237 icons/tokodon/scalable/post-boost.svg 0238 icons/tokodon/scalable/post-boosted.svg 0239 icons/tokodon/scalable/post-favorite.svg 0240 icons/tokodon/scalable/post-favorited.svg 0241 icons/tokodon/scalable/post-reply.svg 0242 icons/tokodon/scalable/tokodon-chat-reply.svg 0243 icons/tokodon/scalable/post-reply-filled.svg 0244 icons/tokodon/index.theme 0245 ) 0246 0247 target_include_directories(tokodon_static PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/search) 0248 target_include_directories(tokodon_static PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/timeline) 0249 target_include_directories(tokodon_static PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/account) 0250 target_include_directories(tokodon_static PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/utils) 0251 target_include_directories(tokodon_static PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/notification) 0252 target_include_directories(tokodon_static PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/network) 0253 target_include_directories(tokodon_static PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/admin) 0254 target_include_directories(tokodon_static PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/conversation) 0255 target_include_directories(tokodon_static PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/editor) 0256 0257 if(ANDROID) 0258 target_sources(tokodon_static 0259 PRIVATE 0260 utils/androidutils.cpp 0261 utils/androidutils.h 0262 ) 0263 qt_target_qml_sources(tokodon_static 0264 QML_FILES 0265 content/ui/Android/ShareAction.qml 0266 content/ui/Android/ShareMenu.qml 0267 ) 0268 set_source_files_properties(content/ui/Android/ShareAction.qml PROPERTIES 0269 QT_RESOURCE_ALIAS content/ui/ShareAction.qml 0270 ) 0271 set_source_files_properties(content/ui/Android/ShareMenu.qml PROPERTIES 0272 QT_RESOURCE_ALIAS content/ui/ShareMenu.qml 0273 ) 0274 else() 0275 qt_target_qml_sources(tokodon_static 0276 QML_FILES 0277 content/ui/ShareAction.qml 0278 content/ui/ShareMenu.qml 0279 ) 0280 endif() 0281 0282 kconfig_add_kcfg_files(tokodon_static GENERATE_MOC config.kcfgc accountconfig.kcfgc) 0283 target_link_libraries(tokodon_static 0284 PUBLIC 0285 Qt::Quick 0286 Qt::Qml 0287 Qt::Gui 0288 Qt::Network 0289 Qt::WebSockets 0290 Qt::QuickControls2 0291 KF6::I18n 0292 KF6::Kirigami2 0293 KF6::Notifications 0294 KF6::ConfigCore 0295 KF6::ConfigGui 0296 KF6::CoreAddons 0297 KF6::ColorScheme 0298 ${QTKEYCHAIN_LIBRARIES} 0299 ${MPV_LIBRARIES} 0300 ) 0301 target_include_directories(tokodon_static PUBLIC ${MPV_INCLUDE_DIRS}) 0302 target_compile_options(tokodon_static PUBLIC ${MPV_CFLAGS_OTHER} -fexceptions) 0303 target_link_directories(tokodon_static PUBLIC ${MPV_LIBRARY_DIRS}) 0304 0305 if (TARGET KF6::KIOWidgets) 0306 target_compile_definitions(tokodon_static PUBLIC -DHAVE_KIO) 0307 target_link_libraries(tokodon_static PUBLIC KF6::KIOWidgets) 0308 endif() 0309 0310 if (SAILFISHOS) 0311 target_compile_definitions(tokodon_static PUBLIC -DSAILFISHOS) 0312 endif() 0313 0314 if(TOKODON_FLATPAK) 0315 target_compile_definitions(tokodon_static PUBLIC TOKODON_FLATPAK) 0316 endif() 0317 0318 if (BUILD_TESTING) 0319 add_subdirectory(autotests) 0320 endif() 0321 0322 add_executable(tokodon 0323 main.cpp 0324 ) 0325 0326 target_include_directories(tokodon PRIVATE ${CMAKE_BINARY_DIR}) 0327 target_link_libraries(tokodon PRIVATE tokodon_static tokodon_staticplugin) 0328 0329 if(ANDROID) 0330 target_link_libraries(tokodon PRIVATE Qt::Svg OpenSSL::SSL) 0331 kirigami_package_breeze_icons(ICONS 0332 "help-about" 0333 "im-user" 0334 "im-invisible-user" 0335 "im-kick-user" 0336 "mail-attachment" 0337 "mail-attachment-symbolic" 0338 "dialog-cancel" 0339 "preferences-desktop-emoticons" 0340 "document-open" 0341 "document-save" 0342 "document-send" 0343 "dialog-close" 0344 "edit-delete-remove" 0345 "code-context" 0346 "document-edit" 0347 "list-user-add" 0348 "list-add-user" 0349 "user-others" 0350 "media-playback-pause" 0351 "media-playback-start" 0352 "go-up" 0353 "go-down" 0354 "list-add" 0355 "irc-join-channel" 0356 "settings-configure" 0357 "configure" 0358 "rating" 0359 "rating-unrated" 0360 "search" 0361 "mail-replied-symbolic" 0362 "edit-copy" 0363 "gtk-quit" 0364 "compass" 0365 "network-connect" 0366 "notifications" 0367 "kstars_xplanet" 0368 "kstars_planets" 0369 "system-users" 0370 "go-home-large" 0371 "view-hidden" 0372 "favorite" 0373 "cell_edit" 0374 "office-chart-bar" 0375 "im-ban-kick-user" 0376 "user-group-properties" 0377 "microphone-sensitivity-muted" 0378 "cards-block" 0379 "system-search" 0380 "bookmarks" 0381 "checkmark" 0382 "lock" 0383 "edit-clear" 0384 "approved" 0385 "delete" 0386 "user-identity" 0387 "download" 0388 "edit-reset" 0389 "dialog-ok" 0390 "gnumeric-graphguru" 0391 "mail-message" 0392 "bookmark-new" 0393 "window-unpin" 0394 "pin" 0395 "edit-entry" 0396 "edit-cut" 0397 "system-switch-user" 0398 ) 0399 else() 0400 target_link_libraries(tokodon PRIVATE Qt::Widgets) 0401 endif() 0402 0403 if (TARGET KF6::DBusAddons) 0404 target_link_libraries(tokodon PRIVATE KF6::DBusAddons KF6::WindowSystem) 0405 target_compile_definitions(tokodon PRIVATE -DHAVE_KDBUSADDONS) 0406 endif () 0407 0408 if(ANDROID) 0409 target_sources(tokodon PRIVATE notifyrc.qrc) 0410 else() 0411 install(FILES tokodon.notifyrc DESTINATION ${KDE_INSTALL_KNOTIFYRCDIR}) 0412 endif() 0413 0414 install(TARGETS tokodon ${KF6_INSTALL_TARGETS_DEFAULT_ARGS}) 0415 0416 if (UNIX AND NOT APPLE AND NOT ANDROID AND NOT TOKODON_FLATPAK) 0417 add_subdirectory(purpose) 0418 endif ()