X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2FCMakeLists.txt;h=d89827765d6bd74c8c8fa92372932aa8092905d9;hp=f2cbb48a686507f43f37c5a0ffc8e3cd6e3f57b1;hb=4ce53949ab7d52a49ae79b8817bd3aa50fada0d1;hpb=931e5280abc6738f94ac052af2a7e31e82487cf1 diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index f2cbb48a..d8982776 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -1,8 +1,8 @@ -# Builds the core module +quassel_add_module(Core) -set(SOURCES +target_sources(${TARGET} PRIVATE abstractsqlstorage.cpp - authenticator.cpp + authenticator.cpp core.cpp corealiasmanager.cpp coreapplication.cpp @@ -12,8 +12,8 @@ set(SOURCES corebuffersyncer.cpp corebufferviewconfig.cpp corebufferviewmanager.cpp - corecoreinfo.cpp coredccconfig.cpp + corehighlightrulemanager.cpp coreidentity.cpp coreignorelistmanager.cpp coreircchannel.cpp @@ -30,6 +30,7 @@ set(SOURCES coreusersettings.cpp ctcpparser.cpp eventstringifier.cpp + identserver.cpp ircparser.cpp netsplit.cpp oidentdconfiggenerator.cpp @@ -41,46 +42,33 @@ set(SOURCES # needed for automoc coreeventmanager.h -) -set(LIBS ) + # Resources + sql.qrc +) -if(HAVE_SSL) - set(SOURCES ${SOURCES} sslserver.cpp) - include_directories(${OPENSSL_INCLUDE_DIR}) +if (HAVE_SSL) + target_sources(${TARGET} PRIVATE sslserver.cpp) endif() -if (QCA2_FOUND) - add_definitions(-DHAVE_QCA2) - include_directories(${QCA2_INCLUDE_DIR}) - list(APPEND SOURCES cipher.cpp) - list(APPEND LIBS ${QCA2_LIBRARIES}) +if (LDAP_FOUND) + target_sources(${TARGET} PRIVATE ldapauthenticator.cpp) + target_link_libraries(${TARGET} PRIVATE ${LDAP_LIBRARIES}) + target_include_directories(${TARGET} PRIVATE ${LDAP_INCLUDE_DIR}) + target_compile_definitions(${TARGET} PRIVATE -DHAVE_LDAP) endif() -if (QCA2-QT5_FOUND) - add_definitions(-DHAVE_QCA2) - include_directories(${QCA2-QT5_INCLUDE_DIR}) - list(APPEND SOURCES cipher.cpp) - list(APPEND LIBS ${QCA2-QT5_LIBRARIES}) +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() -# Build with LDAP if told to do so. -if(HAVE_LDAP) - include_directories(${LDAP_INCLUDE_DIR}) - set(SOURCES ${SOURCES} ldapauthenticator.cpp) - set(MOC_HDRS ${MOC_HDRS} ldapauthenticator.h) -endif(HAVE_LDAP) - -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) - -target_link_libraries(mod_core mod_common ${LIBS}) - -if(HAVE_LDAP) - target_link_libraries(mod_core ${LDAP_LIBRARIES}) -endif(HAVE_LDAP) +target_link_libraries(${TARGET} + PUBLIC + Qt5::Core + Qt5::Network + Qt5::Script + Qt5::Sql + Quassel::Common +)