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 set(SOURCES ${SOURCES} ../../3rdparty/sha512/sha512.c)
70 add_definitions(-DHAVE_SYSLOG)
74 set(SOURCES ${SOURCES} mac_utils.cpp)
78 set(SOURCES ${SOURCES} logbacktrace_win.cpp)
81 add_definitions(-DHAVE_EXECINFO)
82 include_directories(${EXECINFO_INCLUDES})
84 set(SOURCES ${SOURCES} logbacktrace_unix.cpp)
87 qt_add_resources(SOURCES ${COMMON_RCS})
89 add_library(mod_common STATIC ${SOURCES})
90 qt_use_modules(mod_common Core Network)
93 target_link_libraries(mod_common "-framework CoreServices" "-framework CoreFoundation")
96 target_link_libraries(mod_common ${CMAKE_DL_LIBS} ${EXECINFO_LIBRARIES})
99 target_link_libraries(mod_common ${ZLIB_LIBRARIES})
102 # This is needed so translations are generated before trying to build the qrc.
103 # Should probably find a nicer solution with proper dependencies between the involved files, though...
104 add_dependencies(mod_common po)