X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcore%2FCMakeLists.txt;h=a9ea5ee7b61d578ebe1b7b82556cfd2a627f1d54;hb=1d3537dca504cb52ff0434471537a96ca4432007;hp=25e14884add19d155d4b595635f789937618a0ce;hpb=ce26c3770b254362c7bd1e094ba8f8bf22133653;p=quassel.git diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 25e14884..a9ea5ee7 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -40,25 +40,26 @@ set(SOURCES coreeventmanager.h ) +set(LIBS ) + if(HAVE_SSL) set(SOURCES ${SOURCES} sslserver.cpp) include_directories(${OPENSSL_INCLUDE_DIR}) endif(HAVE_SSL) -if(HAVE_QCA2) - set(SOURCES ${SOURCES} cipher.cpp) - include_directories(${QCA2_INCLUDE_DIR}) -endif(HAVE_QCA2) +if (QCA2_FOUND) + add_definitions(-DHAVE_QCA2) + include_directories(${QCA2_INCLUDE_DIR}) + list(APPEND SOURCES cipher.cpp) + list(APPEND LIBS ${QCA2_LIBRARIES}) +endif() include_directories(${CMAKE_SOURCE_DIR}/src/common) -set(CORE_RCS ${CORE_RCS} core/sql.qrc PARENT_SCOPE) +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) -add_dependencies(mod_core mod_common) - -if(HAVE_QCA2) - target_link_libraries(mod_core ${QCA2_LIBRARIES}) -endif(HAVE_QCA2) +target_link_libraries(mod_core mod_common ${LIBS})