X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2FCMakeLists.txt;h=9d0af6eea581ae4228b0cf80f9fd40eab1e864ad;hp=765d7ba1ff6d110fb14e21430d79126f8f13c5d6;hb=73146d4eb2334bd95f98d27dcd7fa3d7cea4adc3;hpb=81c2e2cf2c12eb6839994f95f47698e5252fc91c diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 765d7ba1..9d0af6ee 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -5,52 +5,83 @@ set(QT_USE_QTNETWORK 1) include(${QT_USE_FILE}) set(SOURCES + aliasmanager.cpp backlogmanager.cpp bufferinfo.cpp buffersyncer.cpp bufferviewconfig.cpp bufferviewmanager.cpp - global.cpp + cliparser.cpp identity.cpp + ignorelistmanager.cpp + ircchannel.cpp + irclisthelper.cpp + ircuser.cpp logger.cpp message.cpp + network.cpp + networkconfig.cpp + quassel.cpp settings.cpp signalproxy.cpp syncableobject.cpp - util.cpp - network.cpp - ircuser.cpp - ircchannel.cpp - cliparser.cpp) + util.cpp) + +if(CMAKE_HOST_WIN32) + set(SOURCES ${SOURCES} logbacktrace_win.cpp) +endif(CMAKE_HOST_WIN32) +if(CMAKE_HOST_UNIX) + set(SOURCES ${SOURCES} logbacktrace_unix.cpp) +endif(CMAKE_HOST_UNIX) set(MOC_HDRS + aliasmanager.h backlogmanager.h buffersyncer.h bufferviewconfig.h bufferviewmanager.h coreinfo.h identity.h + ignorelistmanager.h ircchannel.h irclisthelper.h ircuser.h - logger.h network.h + networkconfig.h + settings.h signalproxy.h syncableobject.h) set(HEADERS ${MOC_HDRS} + abstractcliparser.h bufferinfo.h - global.h + cliparser.h + logger.h message.h - settings.h types.h - util.h - cliparser.h) + util.h) + +if(APPLE) + set(SOURCES ${SOURCES} mac_utils.cpp) + set(HEADERS ${HEADERS} mac_utils.h) +endif(APPLE) 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}) + +if(APPLE) + target_link_libraries(mod_common "-framework CoreServices" "-framework CoreFoundation") +endif(APPLE) + +if(CMAKE_HOST_UNIX) + find_library(libdl dl) + if (libdl-NOTFOUND) + message(FATAL_ERROR "Cannot find required library: libdl") + endif (libdl-NOTFOUND) + + target_link_libraries(mod_common ${libdl}) +endif(CMAKE_HOST_UNIX)