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