Fix buildsys to work without DBus
[quassel.git] / src / client / CMakeLists.txt
1 # Builds the client module
2
3 # In Qt4, we still have some minor deps to QtUi: QItemSelectionModel, QSortFilterProxyModel
4 # Still in Qt5: QAbstractItemView in BufferModel
5
6 set(_modules )
7
8 if(WITH_QT5)
9   list(APPEND _modules Widgets)
10 endif(WITH_QT5)
11
12 if(HAVE_DBUS)
13   list(APPEND _modules DBus)
14 endif(HAVE_DBUS)
15
16 setup_qt_variables(Gui Network ${_modules})
17
18 set(SOURCES
19     abstractmessageprocessor.cpp
20     abstractui.cpp
21     backlogrequester.cpp
22     buffermodel.cpp
23     buffersettings.cpp
24     bufferviewoverlay.cpp
25     client.cpp
26     clientaliasmanager.cpp
27     clientbacklogmanager.cpp
28     clientbufferviewconfig.cpp
29     clientbufferviewmanager.cpp
30     clientcoreinfo.cpp
31     clientidentity.cpp
32     clientignorelistmanager.cpp
33     clientirclisthelper.cpp
34     clientsettings.cpp
35     clientuserinputhandler.cpp
36     coreaccount.cpp
37     coreaccountmodel.cpp
38     coreconnection.cpp
39     execwrapper.cpp
40     irclistmodel.cpp
41     messagefilter.cpp
42     messagemodel.cpp
43     networkmodel.cpp
44     selectionmodelsynchronizer.cpp
45     treemodel.cpp)
46
47 set(MOC_HDRS
48     abstractmessageprocessor.h
49     abstractui.h
50     buffermodel.h
51     bufferviewoverlay.h
52     client.h
53     clientaliasmanager.h
54     clientbacklogmanager.h
55     clientbufferviewconfig.h
56     clientbufferviewmanager.h
57     clientcoreinfo.h
58     clientidentity.h
59     clientignorelistmanager.h
60     clientirclisthelper.h
61     clientuserinputhandler.h
62     coreaccountmodel.h
63     coreconnection.h
64     execwrapper.h
65     irclistmodel.h
66     messagefilter.h
67     messagemodel.h
68     networkmodel.h
69     selectionmodelsynchronizer.h
70     treemodel.h)
71
72 set(HEADERS
73     backlogsettings.h
74     backlogrequester.h
75     buffersettings.h
76     clientsettings.h
77     coreaccount.h
78    )
79
80 include_directories(${CMAKE_SOURCE_DIR}/src/common ${QUASSEL_QT_INCLUDES})
81
82 if(NOT WITH_QT5)
83   qt4_wrap_cpp(MOC ${MOC_HDRS})
84 endif(NOT WITH_QT5)
85
86 add_library(mod_client STATIC ${SOURCES} ${MOC} ${HEADERS})
87 add_dependencies(mod_client mod_common)
88
89 set_target_properties(mod_client PROPERTIES COMPILE_FLAGS "${QUASSEL_QT_COMPILEFLAGS}")