X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2FCMakeLists.txt;h=36218f465fe6ed32ede0fe36ff3b16d6c2485719;hp=c05d7c5773372dc34f9a1e7f71d4bd6c5b983e11;hb=ca1209d739f9c4f0e79f2b7cdc2734dde6bb7219;hpb=372e281c83794188819e2a74f570e16684778456 diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index c05d7c57..36218f46 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -1,6 +1,85 @@ -SET(common_SRCS global.cpp logger.cpp message.cpp settings.cpp util.cpp ircuser.cpp) -SET(common_HDRS global.h message.h util.h) -SET(common_MOCS logger.h ircuser.h quasselui.h settings.h) +# Builds the common module -QT4_WRAP_CPP(_MOC ${common_MOCS}) -ADD_LIBRARY(common ${common_SRCS} ${_MOC}) +set(SOURCES + aliasmanager.cpp + authhandler.cpp + backlogmanager.cpp + basichandler.cpp + bufferinfo.cpp + buffersyncer.cpp + bufferviewconfig.cpp + bufferviewmanager.cpp + cliparser.cpp + compressor.cpp + ctcpevent.cpp + event.cpp + eventmanager.cpp + identity.cpp + ignorelistmanager.cpp + internalpeer.cpp + ircchannel.cpp + ircevent.cpp + irclisthelper.cpp + ircuser.cpp + logger.cpp + message.cpp + messageevent.cpp + network.cpp + networkconfig.cpp + networkevent.cpp + peer.cpp + peerfactory.cpp + quassel.cpp + remotepeer.cpp + settings.cpp + signalproxy.cpp + syncableobject.cpp + transfer.cpp + transfermanager.cpp + util.cpp + + protocols/datastream/datastreampeer.cpp + protocols/legacy/legacypeer.cpp + + # needed for automoc + coreinfo.h +) + + +if (QCA2_FOUND) + set(SOURCES ${SOURCES} keyevent.cpp) +endif() + +if (ZLIB_FOUND) + add_definitions(-DHAVE_ZLIB) + include_directories(${ZLIB_INCLUDE_DIRS}) +else() + set(SOURCES ${SOURCES} ../../3rdparty/miniz/miniz.c) +endif() + +if (HAVE_SYSLOG) + add_definitions(-DHAVE_SYSLOG) +endif() + +if(APPLE) + set(SOURCES ${SOURCES} mac_utils.cpp) +endif(APPLE) + +if (WIN32) + set(SOURCES ${SOURCES} logbacktrace_win.cpp) +else() + if (EXECINFO_FOUND) + add_definitions(-DHAVE_EXECINFO) + include_directories(${EXECINFO_INCLUDES}) + endif() + set(SOURCES ${SOURCES} logbacktrace_unix.cpp) +endif() + +add_library(mod_common STATIC ${SOURCES}) +qt_use_modules(mod_common Core Network) + +if(APPLE) + target_link_libraries(mod_common "-framework CoreServices" "-framework CoreFoundation") +endif(APPLE) + +target_link_libraries(mod_common ${CMAKE_DL_LIBS} ${EXECINFO_LIBRARIES} ${ZLIB_LIBRARIES})