cmake: Autogenerate most of the .qrc resource files
[quassel.git] / src / client / CMakeLists.txt
index c149f25..6f4f669 100644 (file)
@@ -1,21 +1,6 @@
-# Builds the client module
+quassel_add_module(Client)
 
-# 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
     buffermodel.cpp
@@ -43,16 +28,20 @@ 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})
-
-add_library(mod_client STATIC ${SOURCES})
-add_dependencies(mod_client mod_common)
+target_link_libraries(${TARGET}
+    PUBLIC
+        Qt5::Core
+        Qt5::Gui
+        Qt5::Network
+        Qt5::Widgets  # QAbstractItemView in BufferModel
+        Quassel::Common
+)
 
-set_target_properties(mod_client PROPERTIES COMPILE_FLAGS "${QUASSEL_QT_COMPILEFLAGS}")
+target_link_if_exists(${TARGET} PUBLIC Quassel::Resource::Data)