Introduce basic (not-yet-compressing) implementation of Compressor
[quassel.git] / src / common / CMakeLists.txt
1 # Builds the common module
2
3 setup_qt_variables(Core Network)
4
5 set(SOURCES
6     aliasmanager.cpp
7     authhandler.cpp
8     backlogmanager.cpp
9     basichandler.cpp
10     bufferinfo.cpp
11     buffersyncer.cpp
12     bufferviewconfig.cpp
13     bufferviewmanager.cpp
14     cliparser.cpp
15     compressor.cpp
16     coreinfo.cpp
17     ctcpevent.cpp
18     event.cpp
19     eventmanager.cpp
20     identity.cpp
21     ignorelistmanager.cpp
22     internalpeer.cpp
23     ircchannel.cpp
24     ircevent.cpp
25     irclisthelper.cpp
26     ircuser.cpp
27     logger.cpp
28     message.cpp
29     messageevent.cpp
30     network.cpp
31     networkconfig.cpp
32     networkevent.cpp
33     peer.cpp
34     peerfactory.cpp
35     quassel.cpp
36     remotepeer.cpp
37     settings.cpp
38     signalproxy.cpp
39     syncableobject.cpp
40     transfer.cpp
41     transfermanager.cpp
42     util.cpp
43
44     protocols/datastream/datastreampeer.cpp
45     protocols/legacy/legacypeer.cpp
46 )
47
48 set(MOC_HDRS
49     aliasmanager.h
50     authhandler.h
51     backlogmanager.h
52     basichandler.h
53     buffersyncer.h
54     bufferviewconfig.h
55     bufferviewmanager.h
56     compressor.h
57     coreinfo.h
58     eventmanager.h
59     identity.h
60     ignorelistmanager.h
61     internalpeer.h
62     ircchannel.h
63     irclisthelper.h
64     ircuser.h
65     network.h
66     networkconfig.h
67     peer.h
68     peerfactory.h
69     remotepeer.h
70     settings.h
71     signalproxy.h
72     syncableobject.h
73     transfer.h
74     transfermanager.h
75
76     protocols/datastream/datastreampeer.h
77     protocols/legacy/legacypeer.h
78 )
79
80 set(HEADERS ${MOC_HDRS}
81     abstractcliparser.h
82     bufferinfo.h
83     cliparser.h
84     ctcpevent.h
85     event.h
86     ircevent.h
87     messageevent.h
88     networkevent.h
89     logger.h
90     message.h
91     protocol.h
92     types.h
93     util.h)
94
95 if (HAVE_QCA2)
96     set(SOURCES ${SOURCES} keyevent.cpp)
97     set(HEADERS ${HEADERS} keyevent.h)
98 endif(HAVE_QCA2)
99
100 if(APPLE)
101   set(SOURCES ${SOURCES} mac_utils.cpp)
102   set(HEADERS ${HEADERS} mac_utils.h)
103 endif(APPLE)
104
105 if(CMAKE_HOST_WIN32)
106     set(SOURCES ${SOURCES} logbacktrace_win.cpp)
107 endif(CMAKE_HOST_WIN32)
108 if(CMAKE_HOST_UNIX)
109     set(SOURCES ${SOURCES} logbacktrace_unix.cpp)
110 endif(CMAKE_HOST_UNIX)
111
112 include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${QUASSEL_QT_INCLUDES})  # for version.inc and version.gen
113
114 if(NOT WITH_QT5)
115   qt4_wrap_cpp(MOC ${MOC_HDRS})
116 endif(NOT WITH_QT5)
117
118 set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES version.gen)
119
120 add_library(mod_common STATIC ${SOURCES} ${HEADERS} ${MOC})
121 set_target_properties(mod_common PROPERTIES COMPILE_FLAGS "${QUASSEL_QT_COMPILEFLAGS}")
122
123 if(APPLE)
124   target_link_libraries(mod_common "-framework CoreServices" "-framework CoreFoundation")
125 endif(APPLE)
126
127 target_link_libraries(mod_common ${CMAKE_DL_LIBS})