X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2FCMakeLists.txt;h=5c6f0b69742c30d573da102de9ecab9f980ba6f0;hp=0046153b18de497ca036e0807f4df2775b5a6723;hb=ff81aaec156b8dc2e12f49286fd69e55f215af29;hpb=fe4b38e66592f11fdf4c4651863968983daecd2d diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 0046153b..5c6f0b69 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -1,66 +1,99 @@ # Builds the core module -set(QT_DONT_USE_QTGUI 1) -set(QT_USE_QTNETWORK 1) -set(QT_USE_QTSQL 1) -set(QT_USE_QTSCRIPT 1) -include(${QT_USE_FILE}) +setup_qt_variables(Network Sql Script) set(SOURCES abstractsqlstorage.cpp - basichandler.cpp core.cpp + corealiasmanager.cpp + coreapplication.cpp corebacklogmanager.cpp + corebasichandler.cpp + corebuffersyncer.cpp corebufferviewconfig.cpp corebufferviewmanager.cpp + corecoreinfo.cpp + coreidentity.cpp + coreignorelistmanager.cpp + coreircchannel.cpp coreirclisthelper.cpp + coreircuser.cpp corenetwork.cpp + corenetworkconfig.cpp coresession.cpp + coresessioneventprocessor.cpp coresettings.cpp + coreuserinputhandler.cpp coreusersettings.cpp - ctcphandler.cpp - ircserverhandler.cpp - networkconnection.cpp + ctcpparser.cpp + eventstringifier.cpp + ircparser.cpp + netsplit.cpp + oidentdconfiggenerator.cpp + postgresqlstorage.cpp sessionthread.cpp sqlitestorage.cpp - storage.cpp - userinputhandler.cpp) + storage.cpp) set(MOC_HDRS abstractsqlstorage.h - basichandler.h core.h + corealiasmanager.h + coreapplication.h corebacklogmanager.h + corebasichandler.h + corebuffersyncer.h corebufferviewconfig.h corebufferviewmanager.h + corecoreinfo.h + coreidentity.h + coreignorelistmanager.h + coreircchannel.h coreirclisthelper.h + coreircuser.h corenetwork.h + corenetworkconfig.h coresession.h - ctcphandler.h - ircserverhandler.h - networkconnection.h + coresessioneventprocessor.h + coreuserinputhandler.h + ctcpparser.h + eventstringifier.h + ircparser.h + netsplit.h + oidentdconfiggenerator.h + postgresqlstorage.h sqlitestorage.h storage.h - sessionthread.h - userinputhandler.h) + sessionthread.h) set(HEADERS coresettings.h coreusersettings.h) -# QT_DEFINITIONS actually does not work, stuff gets included always. -# Funny enough that does not seem to be harmful, but we should still find a way to figure out -# if we have openssl in Qt... -if(OPENSSL_FOUND AND NOT QT_DEFINITIONS MATCHES "-DQT_NO_OPENSSL") +if(HAVE_SSL) set(SOURCES ${SOURCES} sslserver.cpp) set(MOC_HDRS ${MOC_HDRS} sslserver.h) - link_libraries(${OPENSSL_LIBRARIES}) include_directories(${OPENSSL_INCLUDE_DIR}) -endif(OPENSSL_FOUND AND NOT QT_DEFINITIONS MATCHES "-DQT_NO_OPENSSL") +endif(HAVE_SSL) -QT4_WRAP_CPP(MOC ${MOC_HDRS}) +if(HAVE_QCA2) + set(SOURCES ${SOURCES} cipher.cpp) + set(HEADERS ${HEADERS} cipher.h) + include_directories(${QCA2_INCLUDE_DIR}) +endif(HAVE_QCA2) -include_directories(${CMAKE_SOURCE_DIR}/src/common) +include_directories(${CMAKE_SOURCE_DIR}/src/common ${QUASSEL_QT_INCLUDES}) + +if(NOT WITH_QT5) + qt4_wrap_cpp(MOC ${MOC_HDRS}) +endif(NOT WITH_QT5) + +set(CORE_RCS ${CORE_RCS} core/sql.qrc PARENT_SCOPE) add_library(mod_core STATIC ${SOURCES} ${MOC} ${HEADERS}) add_dependencies(mod_core mod_common) +set_target_properties(mod_core PROPERTIES COMPILE_FLAGS "${QUASSEL_QT_COMPILEFLAGS}") + +if(HAVE_QCA2) + target_link_libraries(mod_core ${QCA2_LIBRARIES}) +endif(HAVE_QCA2)