X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2FCMakeLists.txt;h=9d0af6eea581ae4228b0cf80f9fd40eab1e864ad;hp=ddccfb9ecabee81d5e5cbfbea6fc568453a5b6e8;hb=73146d4eb2334bd95f98d27dcd7fa3d7cea4adc3;hpb=6579cd49c867ce3fb6c99127851a881ea82d1b1b diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index ddccfb9e..9d0af6ee 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -11,18 +11,28 @@ set(SOURCES 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 @@ -32,27 +42,46 @@ set(MOC_HDRS 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)