1 # Builds the common module
41 protocols/datastream/datastreampeer.cpp
42 protocols/legacy/legacypeer.cpp
51 list(APPEND SOURCES qt5cliparser.cpp)
53 list(APPEND SOURCES cliparser.cpp)
56 if (QCA2_FOUND OR QCA2-QT5_FOUND)
57 set(SOURCES ${SOURCES} keyevent.cpp)
61 add_definitions(-DHAVE_ZLIB)
62 include_directories(${ZLIB_INCLUDE_DIRS})
64 set(SOURCES ${SOURCES} ../../3rdparty/miniz/miniz.c)
68 set(SOURCES ${SOURCES} ../../3rdparty/sha512/sha512.c)
72 add_definitions(-DHAVE_SYSLOG)
76 set(SOURCES ${SOURCES} mac_utils.cpp)
80 set(SOURCES ${SOURCES} logbacktrace_win.cpp)
83 add_definitions(-DHAVE_EXECINFO)
84 include_directories(${EXECINFO_INCLUDES})
86 set(SOURCES ${SOURCES} logbacktrace_unix.cpp)
89 qt_add_resources(SOURCES ${COMMON_RCS})
91 add_library(mod_common STATIC ${SOURCES})
92 qt_use_modules(mod_common Core Network)
95 target_link_libraries(mod_common "-framework CoreServices" "-framework CoreFoundation")
98 target_link_libraries(mod_common ${CMAKE_DL_LIBS} ${EXECINFO_LIBRARIES})
101 target_link_libraries(mod_common ${ZLIB_LIBRARIES})
104 # This is needed so translations are generated before trying to build the qrc.
105 # Should probably find a nicer solution with proper dependencies between the involved files, though...
106 add_dependencies(mod_common po)