More changes to the build system; make i18n generation nicer
[quassel.git] / src / common / CMakeLists.txt
1 # Builds the common module
2
3 set(QT_DONT_USE_QTGUI 1)
4 set(QT_USE_QTNETWORK 1)
5 include(${QT_USE_FILE})
6
7 set(SOURCES
8     aliasmanager.cpp
9     backlogmanager.cpp
10     bufferinfo.cpp
11     buffersyncer.cpp
12     bufferviewconfig.cpp
13     bufferviewmanager.cpp
14     cliparser.cpp
15     identity.cpp
16     ircchannel.cpp
17     ircuser.cpp
18     logger.cpp
19     message.cpp
20     network.cpp
21     quassel.cpp
22     settings.cpp
23     signalproxy.cpp
24     syncableobject.cpp
25     util.cpp)
26
27 set(MOC_HDRS
28     aliasmanager.h
29     backlogmanager.h
30     buffersyncer.h
31     bufferviewconfig.h
32     bufferviewmanager.h
33     coreinfo.h
34     identity.h
35     ircchannel.h
36     irclisthelper.h
37     ircuser.h
38     network.h
39     settings.h
40     signalproxy.h
41     syncableobject.h)
42
43 set(HEADERS ${MOC_HDRS}
44     bufferinfo.h
45     cliparser.h
46     logger.h
47     message.h
48     types.h
49     util.h)
50
51 qt4_wrap_cpp(MOC ${MOC_HDRS})
52
53 # Languages
54 qt4_add_resources(RC_I18N ${CMAKE_BINARY_DIR}/i18n.qrc)
55
56 include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR})  # for version.inc and version.gen
57 add_definitions(-DHAVE_VERSION_GEN)  # we ensure that by deps in the main CMakeLists.txt
58 set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES version.gen)
59
60 add_library(mod_common STATIC ${SOURCES} ${MOC} ${RC_I18N})