X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2FCMakeLists.txt;h=52560a12bfbd1fd30e395ed17cd9d574e3fe7ef0;hp=26e087a635afec776cfdab854c33b0c5663fa558;hb=bc544f569faedea50c7715844a2261872796c683;hpb=06a46322b6107fe4a38c310a6292cc1ef3330950 diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 26e087a6..52560a12 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -1,7 +1,92 @@ -SET(common_SRCS global.cpp logger.cpp message.cpp settings.cpp signalproxy.cpp util.cpp ircuser.cpp) -SET(common_HDRS global.h message.h util.h) -SET(common_MOCS logger.h ircuser.h settings.h signalproxy.h) +# Builds the common module -QT4_WRAP_CPP(_MOC ${common_MOCS}) -ADD_LIBRARY(common ${common_SRCS} ${_MOC}) -TARGET_LINK_LIBRARIES(common qxt) +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 + presetnetworks.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 OR QCA2-QT5_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() + +qt_add_resources(SOURCES ${COMMON_RCS}) + +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}) + +# This is needed so translations are generated before trying to build the qrc. +# Should probably find a nicer solution with proper dependencies between the involved files, though... +add_dependencies(mod_common po)