QssParser: Interpret "oblique" as italic
[quassel.git] / src / common / CMakeLists.txt
1 # Builds the common module
2
3 set(SOURCES
4     aliasmanager.cpp
5     authhandler.cpp
6     backlogmanager.cpp
7     basichandler.cpp
8     bufferinfo.cpp
9     buffersyncer.cpp
10     bufferviewconfig.cpp
11     bufferviewmanager.cpp
12     compressor.cpp
13     coreinfo.cpp
14     ctcpevent.cpp
15     dccconfig.cpp
16     event.cpp
17     eventmanager.cpp
18     highlightrulemanager.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     logmessage.cpp
28     message.cpp
29     messageevent.cpp
30     network.cpp
31     networkconfig.cpp
32     networkevent.cpp
33     peer.cpp
34     peerfactory.cpp
35     presetnetworks.cpp
36     quassel.cpp
37     remotepeer.cpp
38     settings.cpp
39     signalproxy.cpp
40     syncableobject.cpp
41     transfer.cpp
42     transfermanager.cpp
43     types.cpp
44     util.cpp
45
46     serializers/serializers.cpp
47
48     protocols/datastream/datastreampeer.cpp
49     protocols/legacy/legacypeer.cpp
50
51     # needed for automoc
52     irccap.h
53     protocol.h
54 )
55
56 if (USE_QT5)
57     list(APPEND SOURCES qt5cliparser.cpp)
58 else()
59     list(APPEND SOURCES cliparser.cpp)
60 endif()
61
62 if (QCA2_FOUND OR QCA2-QT5_FOUND)
63     set(SOURCES ${SOURCES} keyevent.cpp)
64 endif()
65
66 if (ZLIB_FOUND)
67     add_definitions(-DHAVE_ZLIB)
68     include_directories(${ZLIB_INCLUDE_DIRS})
69 else()
70     set(SOURCES ${SOURCES} ../../3rdparty/miniz/miniz.c)
71 endif()
72
73 if (USE_QT4)
74     set(SOURCES ${SOURCES} ../../3rdparty/sha512/sha512.c)
75 endif()
76
77 if (HAVE_SYSLOG)
78     add_definitions(-DHAVE_SYSLOG)
79 endif()
80
81 if (APPLE)
82     set(SOURCES ${SOURCES} mac_utils.cpp)
83 endif()
84
85 if (WIN32)
86     set(SOURCES ${SOURCES} logbacktrace_win.cpp)
87 else()
88     if (EXECINFO_FOUND)
89         add_definitions(-DHAVE_EXECINFO)
90         include_directories(${EXECINFO_INCLUDES})
91     endif()
92     set(SOURCES ${SOURCES} logbacktrace_unix.cpp)
93 endif()
94
95 qt_add_resources(SOURCES ${COMMON_RCS})
96
97 add_library(mod_common STATIC ${SOURCES})
98 qt_use_modules(mod_common Core Network)
99
100 if (APPLE)
101     target_link_libraries(mod_common "-framework CoreServices" "-framework CoreFoundation")
102 endif()
103
104 target_link_libraries(mod_common ${CMAKE_DL_LIBS} ${EXECINFO_LIBRARIES})
105
106 if(ZLIB_FOUND)
107     target_link_libraries(mod_common ${ZLIB_LIBRARIES})
108 endif()
109
110 # This is needed so translations are generated before trying to build the qrc.
111 # Should probably find a nicer solution with proper dependencies between the involved files, though...
112 add_dependencies(mod_common po)