X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fclient%2FCMakeLists.txt;h=7546443101b0da4b636cb5a46ac3147eba585c38;hp=4f0106c4e2524cf453541f46042b3227bdb56eff;hb=900cce213a6ed000b7131a05a0dec7d04b35b023;hpb=e50ae7a06fc4e5d3a911c361d30953410deab609 diff --git a/src/client/CMakeLists.txt b/src/client/CMakeLists.txt index 4f0106c4..75464431 100644 --- a/src/client/CMakeLists.txt +++ b/src/client/CMakeLists.txt @@ -1,9 +1,6 @@ -# Builds the client module +quassel_add_module(Client EXPORT) -# In Qt4, we still have some minor deps to QtGui: QItemSelectionModel, QSortFilterProxyModel -# Still in Qt5: QAbstractItemView in BufferModel - -set(SOURCES +target_sources(${TARGET} PRIVATE abstractmessageprocessor.cpp backlogrequester.cpp buffermodel.cpp @@ -31,29 +28,24 @@ set(SOURCES messagemodel.cpp networkmodel.cpp selectionmodelsynchronizer.cpp + transfermodel.cpp treemodel.cpp # needed for automoc abstractui.h - clientcoreinfo.h ) -if (KDE4_FOUND) - include_directories(${KDE4_INCLUDES}) - add_definitions(-DHAVE_KDE ${KDE4_DEFINITIONS}) -endif() +target_link_libraries(${TARGET} + PUBLIC + Qt5::Core + Qt5::Gui + Qt5::Network + Qt5::Widgets # QAbstractItemView in BufferModel + Quassel::Common +) -if (USE_QT5) - list(APPEND qt_modules Widgets) +if (EMBED_DATA) + set_property(SOURCE client.cpp APPEND PROPERTY COMPILE_DEFINITIONS EMBED_DATA) endif() -qt_add_resources(SOURCES ${CLIENT_RCS}) - -add_library(mod_client STATIC ${SOURCES}) -qt_use_modules(mod_client Network Core Gui ${qt_modules}) - -target_link_libraries(mod_client mod_common) - -if (KDE4_FOUND) - target_link_libraries(mod_client ${KDE4_SOLID_LIBS}) -endif() +target_link_if_exists(${TARGET} PUBLIC Quassel::Resource::Data)