cmake: Remove build system support for Qt4/KDE4
[quassel.git] / src / core / CMakeLists.txt
1 # Builds the core module
2
3 set(SOURCES
4     abstractsqlstorage.cpp
5     authenticator.cpp
6     core.cpp
7     corealiasmanager.cpp
8     coreapplication.cpp
9     coreauthhandler.cpp
10     corebacklogmanager.cpp
11     corebasichandler.cpp
12     corebuffersyncer.cpp
13     corebufferviewconfig.cpp
14     corebufferviewmanager.cpp
15     coredccconfig.cpp
16     corehighlightrulemanager.cpp
17     coreidentity.cpp
18     coreignorelistmanager.cpp
19     coreircchannel.cpp
20     coreirclisthelper.cpp
21     coreircuser.cpp
22     corenetwork.cpp
23     corenetworkconfig.cpp
24     coresession.cpp
25     coresessioneventprocessor.cpp
26     coresettings.cpp
27     coretransfer.cpp
28     coretransfermanager.cpp
29     coreuserinputhandler.cpp
30     coreusersettings.cpp
31     ctcpparser.cpp
32     eventstringifier.cpp
33     identserver.cpp
34     ircparser.cpp
35     netsplit.cpp
36     oidentdconfiggenerator.cpp
37     postgresqlstorage.cpp
38     sessionthread.cpp
39     sqlauthenticator.cpp
40     sqlitestorage.cpp
41     storage.cpp
42
43     # needed for automoc
44     coreeventmanager.h
45 )
46
47 set(LIBS )
48
49 if(HAVE_SSL)
50   set(SOURCES ${SOURCES} sslserver.cpp)
51   include_directories(${OPENSSL_INCLUDE_DIR})
52 endif()
53
54 if (QCA2-QT5_FOUND)
55     add_definitions(-DHAVE_QCA2)
56     include_directories(${QCA2-QT5_INCLUDE_DIR})
57     list(APPEND SOURCES cipher.cpp)
58     list(APPEND LIBS ${QCA2-QT5_LIBRARIES})
59 endif()
60
61 # Build with LDAP if told to do so.
62 if(HAVE_LDAP)
63     include_directories(${LDAP_INCLUDE_DIR})
64     set(SOURCES ${SOURCES} ldapauthenticator.cpp)
65     set(MOC_HDRS ${MOC_HDRS} ldapauthenticator.h)
66 endif(HAVE_LDAP)
67
68 include_directories(${CMAKE_SOURCE_DIR}/src/common)
69
70 set(CORE_RCS ${CORE_RCS} ${CMAKE_CURRENT_SOURCE_DIR}/sql.qrc)
71 qt5_add_resources(SOURCES ${CORE_RCS})
72
73 add_library(mod_core STATIC ${SOURCES})
74 qt5_use_modules(mod_core Core Network Script Sql)
75
76 target_link_libraries(mod_core mod_common ${LIBS})
77
78 if(HAVE_LDAP)
79     target_link_libraries(mod_core ${LDAP_LIBRARIES})
80 endif(HAVE_LDAP)