Move NeoChatConnection and NeoChatRoom to LibNeoChat

Move `NeoChatConnection` and `NeoChatRoom` to `LibNeoChat` along with any required dependencies.
This commit is contained in:
James Graham
2025-04-07 18:52:15 +00:00
parent 8327b4369e
commit aef4f75c33
54 changed files with 57 additions and 72 deletions

View File

@@ -4,7 +4,30 @@
add_library(LibNeoChat STATIC)
target_sources(LibNeoChat PRIVATE
neochatconnection.cpp
neochatroom.cpp
neochatroommember.cpp
chatbarcache.cpp
clipboard.cpp
delegatesizehelper.cpp
emojitones.cpp
eventhandler.cpp
filetransferpseudojob.cpp
linkpreviewer.cpp
roomlastmessageprovider.cpp
spacehierarchycache.cpp
texthandler.cpp
urlhelper.cpp
utils.cpp
enums/messagecomponenttype.h
enums/messagetype.h
enums/powerlevel.cpp
enums/pushrule.h
events/imagepackevent.cpp
events/pollevent.cpp
models/actionsmodel.cpp
models/customemojimodel.cpp
models/emojimodel.cpp
)
ecm_add_qml_module(LibNeoChat GENERATE_PLUGIN_SOURCE
@@ -12,8 +35,33 @@ ecm_add_qml_module(LibNeoChat GENERATE_PLUGIN_SOURCE
OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/src/org/kde/neochat/libneochat
)
ecm_qt_declare_logging_category(LibNeoChat
HEADER "eventhandler_logging.h"
IDENTIFIER "EventHandling"
CATEGORY_NAME "org.kde.neochat.eventhandler"
DEFAULT_SEVERITY Info
)
generate_export_header(LibNeoChat BASE_NAME LibNeoChat)
target_include_directories(LibNeoChat PRIVATE ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/enums ${CMAKE_CURRENT_SOURCE_DIR}/events ${CMAKE_CURRENT_SOURCE_DIR}/models)
target_link_libraries(LibNeoChat PUBLIC
Qt::Core
Qt::Multimedia
Qt::Quick
KF6::ConfigCore
KF6::CoreAddons
KF6::I18n
KF6::Kirigami
QuotientQt6
cmark::cmark
QCoro::Core
QCoro::Network
)
if(NOT ANDROID)
target_link_libraries(LibNeoChat PUBLIC
KF6::KIOWidgets
ICU::uc
)
target_compile_definitions(LibNeoChat PUBLIC -DHAVE_ICU)
endif()