Add support for Qt5 in the build system
[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 if(NOT WITH_QT5)
6   setup_qt_variables(Gui Network DBus)
7 else(NOT WITH_QT5)
8   setup_qt_variables(Widgets Network DBus)
9 endif(NOT WITH_QT5)
10
11 set(SOURCES
12     abstractmessageprocessor.cpp
13     abstractui.cpp
14     backlogrequester.cpp
15     buffermodel.cpp
16     buffersettings.cpp
17     bufferviewoverlay.cpp
18     client.cpp
19     clientaliasmanager.cpp
20     clientbacklogmanager.cpp
21     clientbufferviewconfig.cpp
22     clientbufferviewmanager.cpp
23     clientcoreinfo.cpp
24     clientidentity.cpp
25     clientignorelistmanager.cpp
26     clientirclisthelper.cpp
27     clientsettings.cpp
28     clientuserinputhandler.cpp
29     coreaccount.cpp
30     coreaccountmodel.cpp
31     coreconnection.cpp
32     execwrapper.cpp
33     irclistmodel.cpp
34     messagefilter.cpp
35     messagemodel.cpp
36     networkmodel.cpp
37     selectionmodelsynchronizer.cpp
38     treemodel.cpp)
39
40 set(MOC_HDRS
41     abstractmessageprocessor.h
42     abstractui.h
43     buffermodel.h
44     bufferviewoverlay.h
45     client.h
46     clientaliasmanager.h
47     clientbacklogmanager.h
48     clientbufferviewconfig.h
49     clientbufferviewmanager.h
50     clientcoreinfo.h
51     clientidentity.h
52     clientignorelistmanager.h
53     clientirclisthelper.h
54     clientuserinputhandler.h
55     coreaccountmodel.h
56     coreconnection.h
57     execwrapper.h
58     irclistmodel.h
59     messagefilter.h
60     messagemodel.h
61     networkmodel.h
62     selectionmodelsynchronizer.h
63     treemodel.h)
64
65 set(HEADERS
66     backlogsettings.h
67     backlogrequester.h
68     buffersettings.h
69     clientsettings.h
70     coreaccount.h
71    )
72
73 include_directories(${CMAKE_SOURCE_DIR}/src/common ${QUASSEL_QT_INCLUDES})
74
75 if(NOT WITH_QT5)
76   qt4_wrap_cpp(MOC ${MOC_HDRS})
77 endif(NOT WITH_QT5)
78
79 add_library(mod_client STATIC ${SOURCES} ${MOC} ${HEADERS})
80 add_dependencies(mod_client mod_common)
81
82 set_target_properties(mod_client PROPERTIES COMPILE_FLAGS "${QUASSEL_QT_COMPILEFLAGS}")