X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fclient%2FCMakeLists.txt;h=756a5409267f4083753e6a774eae6f6c712c8a24;hb=b8db3c55a7f66a8d6ecabf9039aabceff9ae4837;hp=c149f256a5c4bdf026740a6ff5fdf538aae7e25b;hpb=0de0a17782cf478d638a532f36898197af88e0bc;p=quassel.git diff --git a/src/client/CMakeLists.txt b/src/client/CMakeLists.txt index c149f256..756a5409 100644 --- a/src/client/CMakeLists.txt +++ b/src/client/CMakeLists.txt @@ -1,23 +1,9 @@ -# Builds the client module +quassel_add_module(Client EXPORT) -# In Qt4, we still have some minor deps to QtUi: QItemSelectionModel, QSortFilterProxyModel -# Still in Qt5: QAbstractItemView in BufferModel - -set(_modules ) - -if(WITH_QT5) - list(APPEND _modules Widgets) -endif(WITH_QT5) - -if(HAVE_DBUS) - list(APPEND _modules DBus) -endif(HAVE_DBUS) - -setup_qt_variables(Gui Network ${_modules}) - -set(SOURCES +target_sources(${TARGET} PRIVATE abstractmessageprocessor.cpp backlogrequester.cpp + backlogsettings.cpp buffermodel.cpp buffersettings.cpp bufferviewoverlay.cpp @@ -43,16 +29,24 @@ set(SOURCES messagemodel.cpp networkmodel.cpp selectionmodelsynchronizer.cpp + transfermodel.cpp treemodel.cpp # needed for automoc abstractui.h - clientcoreinfo.h ) -include_directories(${CMAKE_SOURCE_DIR}/src/common ${QUASSEL_QT_INCLUDES}) +target_link_libraries(${TARGET} + PUBLIC + Qt5::Core + Qt5::Gui + Qt5::Network + Qt5::Widgets # QAbstractItemView in BufferModel + Quassel::Common +) -add_library(mod_client STATIC ${SOURCES}) -add_dependencies(mod_client mod_common) +if (EMBED_DATA) + set_property(SOURCE client.cpp APPEND PROPERTY COMPILE_DEFINITIONS EMBED_DATA) +endif() -set_target_properties(mod_client PROPERTIES COMPILE_FLAGS "${QUASSEL_QT_COMPILEFLAGS}") +target_link_if_exists(${TARGET} PUBLIC Quassel::Resource::Data)