X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2FCMakeLists.txt;h=e571708cbf938e6759f8d29bb6d370a00d6bd041;hp=6a0611af5e694ea3f3931b14c280a24141953551;hb=bad087a1b604c92c7c0bf3cf818b81d26e15c1c4;hpb=c3c6809d89bd860cb74c7cc1336f190cfe97a3b9 diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 6a0611af..e571708c 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -1,7 +1,8 @@ -# Builds the core module +quassel_add_module(Core) -set(SOURCES +target_sources(${TARGET} PRIVATE abstractsqlstorage.cpp + authenticator.cpp core.cpp corealiasmanager.cpp coreapplication.cpp @@ -11,7 +12,8 @@ set(SOURCES corebuffersyncer.cpp corebufferviewconfig.cpp corebufferviewmanager.cpp - corecoreinfo.cpp + coredccconfig.cpp + corehighlightrulemanager.cpp coreidentity.cpp coreignorelistmanager.cpp coreircchannel.cpp @@ -28,42 +30,48 @@ set(SOURCES coreusersettings.cpp ctcpparser.cpp eventstringifier.cpp + identserver.cpp ircparser.cpp netsplit.cpp oidentdconfiggenerator.cpp postgresqlstorage.cpp sessionthread.cpp + sqlauthenticator.cpp sqlitestorage.cpp storage.cpp # needed for automoc coreeventmanager.h -) - -set(LIBS ) -if(HAVE_SSL) - set(SOURCES ${SOURCES} sslserver.cpp) - include_directories(${OPENSSL_INCLUDE_DIR}) -endif(HAVE_SSL) + # Resources + sql.qrc +) -if (QCA2_FOUND) - add_definitions(-DHAVE_QCA2) - include_directories(${QCA2_INCLUDE_DIR}) - list(APPEND SOURCES cipher.cpp) - list(APPEND LIBS ${QCA2_LIBRARIES}) +if (HAVE_SSL) + target_sources(${TARGET} PRIVATE sslserver.cpp) endif() -include_directories(${CMAKE_SOURCE_DIR}/src/common) - -set(CORE_RCS ${CORE_RCS} ${CMAKE_CURRENT_SOURCE_DIR}/sql.qrc) -qt_add_resources(SOURCES ${CORE_RCS}) - -add_library(mod_core STATIC ${SOURCES}) -qt_use_modules(mod_core Core Network Script Sql) +if (HAVE_UMASK) + set_source_files_properties(oidentdconfiggenerator.cpp PROPERTIES COMPILE_DEFINITIONS HAVE_UMASK) +endif() -add_dependencies(mod_core mod_common) +if (Ldap_FOUND) + target_sources(${TARGET} PRIVATE ldapauthenticator.cpp) + target_link_libraries(${TARGET} PRIVATE Ldap::Ldap) + set_source_files_properties(core.cpp PROPERTIES COMPILE_DEFINITIONS HAVE_LDAP) +endif() -if (LIBS) - target_link_libraries(mod_core ${LIBS}) +if (Qca-qt5_FOUND) + target_sources(${TARGET} PRIVATE cipher.cpp keyevent.cpp) + target_link_libraries(${TARGET} PUBLIC qca-qt5) + target_compile_definitions(${TARGET} PUBLIC -DHAVE_QCA2) endif() + +target_link_libraries(${TARGET} + PUBLIC + Qt5::Core + Qt5::Network + Qt5::Script + Qt5::Sql + Quassel::Common +)