1 # Builds the common module
41 protocols/datastream/datastreampeer.cpp
42 protocols/legacy/legacypeer.cpp
49 list(APPEND SOURCES qt5cliparser.cpp)
51 list(APPEND SOURCES cliparser.cpp)
54 if (QCA2_FOUND OR QCA2-QT5_FOUND)
55 set(SOURCES ${SOURCES} keyevent.cpp)
59 add_definitions(-DHAVE_ZLIB)
60 include_directories(${ZLIB_INCLUDE_DIRS})
62 set(SOURCES ${SOURCES} ../../3rdparty/miniz/miniz.c)
66 add_definitions(-DHAVE_SYSLOG)
70 set(SOURCES ${SOURCES} mac_utils.cpp)
74 set(SOURCES ${SOURCES} logbacktrace_win.cpp)
77 add_definitions(-DHAVE_EXECINFO)
78 include_directories(${EXECINFO_INCLUDES})
80 set(SOURCES ${SOURCES} logbacktrace_unix.cpp)
83 qt_add_resources(SOURCES ${COMMON_RCS})
85 add_library(mod_common STATIC ${SOURCES})
86 qt_use_modules(mod_common Core Network)
89 target_link_libraries(mod_common "-framework CoreServices" "-framework CoreFoundation")
92 target_link_libraries(mod_common ${CMAKE_DL_LIBS} ${EXECINFO_LIBRARIES} ${ZLIB_LIBRARIES})
94 # This is needed so translations are generated before trying to build the qrc.
95 # Should probably find a nicer solution with proper dependencies between the involved files, though...
96 add_dependencies(mod_common po)