X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcommon%2FCMakeLists.txt;h=8690625e2745da3b464bbfdad8aebed1a7c8fde9;hb=0de0a17782cf478d638a532f36898197af88e0bc;hp=8baf2597d774c88cf73c4864c6ec8a88b66c265d;hpb=f5d08a1e466b69f8c35e3b30e4cf898a71bc8b83;p=quassel.git diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 8baf2597..8690625e 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -1,28 +1,64 @@ # Builds the common module -set(QT_DONT_USE_QTGUI 1) -set(QT_USE_QTNETWORK 1) -include(${QT_USE_FILE}) +setup_qt_variables(Core Network) 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 - util.cpp) + transfer.cpp + transfermanager.cpp + util.cpp + + protocols/datastream/datastreampeer.cpp + protocols/legacy/legacypeer.cpp + + # needed for automoc + coreinfo.h +) + + +if (HAVE_QCA2) + set(SOURCES ${SOURCES} keyevent.cpp) +endif(HAVE_QCA2) + +if(NOT HAVE_ZLIB) + set(SOURCES ${SOURCES} ../../3rdparty/miniz/miniz.c) +endif(NOT HAVE_ZLIB) + +if(APPLE) + set(SOURCES ${SOURCES} mac_utils.cpp) +endif(APPLE) if(CMAKE_HOST_WIN32) set(SOURCES ${SOURCES} logbacktrace_win.cpp) @@ -31,40 +67,13 @@ if(CMAKE_HOST_UNIX) set(SOURCES ${SOURCES} logbacktrace_unix.cpp) endif(CMAKE_HOST_UNIX) +include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${QUASSEL_QT_INCLUDES}) # for version.inc and version.gen +add_library(mod_common STATIC ${SOURCES}) +set_target_properties(mod_common PROPERTIES COMPILE_FLAGS "${QUASSEL_QT_COMPILEFLAGS}") -set(MOC_HDRS - aliasmanager.h - backlogmanager.h - buffersyncer.h - bufferviewconfig.h - bufferviewmanager.h - coreinfo.h - identity.h - ircchannel.h - irclisthelper.h - ircuser.h - network.h - settings.h - signalproxy.h - syncableobject.h) - -set(HEADERS ${MOC_HDRS} - bufferinfo.h - cliparser.h - logger.h - message.h - types.h - util.h) - -qt4_wrap_cpp(MOC ${MOC_HDRS}) - - -include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}) # for version.inc and version.gen -add_definitions(-DHAVE_VERSION_GEN) # we ensure that by deps in the main CMakeLists.txt -set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES version.gen) - -add_library(mod_common STATIC ${SOURCES} ${MOC} ${CMAKE_BINARY_DIR}/i18n/qrc_i18n.cxx) -set_source_files_properties(${CMAKE_BINARY_DIR}/i18n/qrc_i18n.cxx PROPERTIES GENERATED true) -add_dependencies(mod_common i18n) +if(APPLE) + target_link_libraries(mod_common "-framework CoreServices" "-framework CoreFoundation") +endif(APPLE) +target_link_libraries(mod_common ${CMAKE_DL_LIBS})