X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2FCMakeLists.txt;h=e33723553b83f22279aa4dca30128b67bc27ab3f;hp=dfb028939a33fb2a97f8bed6b765de99825b8e4f;hb=73b7e9b2e6b0742e344238c6ebac05919efd914b;hpb=0d7b511c8510d7fd05d3a704114e34ff37f7a995 diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index dfb02893..e3372355 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -1,7 +1,5 @@ # Builds the core module -setup_qt_variables(Network Sql Script) - set(SOURCES abstractsqlstorage.cpp core.cpp @@ -36,71 +34,35 @@ set(SOURCES postgresqlstorage.cpp sessionthread.cpp sqlitestorage.cpp - storage.cpp) + storage.cpp -set(MOC_HDRS - abstractsqlstorage.h - core.h - corealiasmanager.h - coreapplication.h - coreauthhandler.h - corebacklogmanager.h - corebasichandler.h - corebuffersyncer.h - corebufferviewconfig.h - corebufferviewmanager.h - corecoreinfo.h + # needed for automoc coreeventmanager.h - coreidentity.h - coreignorelistmanager.h - coreircchannel.h - coreirclisthelper.h - coreircuser.h - corenetwork.h - corenetworkconfig.h - coresession.h - coresessioneventprocessor.h - coretransfer.h - coretransfermanager.h - coreuserinputhandler.h - ctcpparser.h - eventstringifier.h - ircparser.h - netsplit.h - oidentdconfiggenerator.h - postgresqlstorage.h - sqlitestorage.h - storage.h - sessionthread.h) +) -set(HEADERS - coresettings.h - coreusersettings.h) +set(LIBS ) if(HAVE_SSL) set(SOURCES ${SOURCES} sslserver.cpp) - set(MOC_HDRS ${MOC_HDRS} sslserver.h) include_directories(${OPENSSL_INCLUDE_DIR}) endif(HAVE_SSL) -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 ${QUASSEL_QT_INCLUDES}) +if (QCA2_FOUND) + add_definitions(-DHAVE_QCA2) + include_directories(${QCA2_INCLUDE_DIR}) + list(APPEND SOURCES cipher.cpp) + list(APPEND LIBS ${QCA2_LIBRARIES}) +endif() -if(NOT WITH_QT5) - qt4_wrap_cpp(MOC ${MOC_HDRS}) -endif(NOT WITH_QT5) +include_directories(${CMAKE_SOURCE_DIR}/src/common) set(CORE_RCS ${CORE_RCS} core/sql.qrc PARENT_SCOPE) -add_library(mod_core STATIC ${SOURCES} ${MOC} ${HEADERS}) +add_library(mod_core STATIC ${SOURCES}) +qt_use_modules(mod_core Core Network Script Sql) + 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) +if (LIBS) + target_link_libraries(mod_core ${LIBS}) +endif()