X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcommon%2FCMakeLists.txt;h=90ccb5f33d528a438f2a308f5f10b46606cc72a8;hb=d32f2fcafe3d3925cd64e332e0d02261a134af21;hp=36218f465fe6ed32ede0fe36ff3b16d6c2485719;hpb=84cd3561e97167ffb98ecab0fd2b884ba1d13ada;p=quassel.git diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 36218f46..90ccb5f3 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -9,7 +9,6 @@ set(SOURCES buffersyncer.cpp bufferviewconfig.cpp bufferviewmanager.cpp - cliparser.cpp compressor.cpp ctcpevent.cpp event.cpp @@ -29,6 +28,7 @@ set(SOURCES networkevent.cpp peer.cpp peerfactory.cpp + presetnetworks.cpp quassel.cpp remotepeer.cpp settings.cpp @@ -45,8 +45,13 @@ set(SOURCES coreinfo.h ) +if (USE_QT5) + list(APPEND SOURCES qt5cliparser.cpp) +else() + list(APPEND SOURCES cliparser.cpp) +endif() -if (QCA2_FOUND) +if (QCA2_FOUND OR QCA2-QT5_FOUND) set(SOURCES ${SOURCES} keyevent.cpp) endif() @@ -61,8 +66,8 @@ if (HAVE_SYSLOG) add_definitions(-DHAVE_SYSLOG) endif() -if(APPLE) - set(SOURCES ${SOURCES} mac_utils.cpp) +if (APPLE) + set(SOURCES ${SOURCES} mac_utils.cpp) endif(APPLE) if (WIN32) @@ -75,11 +80,17 @@ else() 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") +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)