1 # Builds the common module
42 protocols/datastream/datastreampeer.cpp
43 protocols/legacy/legacypeer.cpp
52 list(APPEND SOURCES qt5cliparser.cpp)
54 list(APPEND SOURCES cliparser.cpp)
57 if (QCA2_FOUND OR QCA2-QT5_FOUND)
58 set(SOURCES ${SOURCES} keyevent.cpp)
62 add_definitions(-DHAVE_ZLIB)
63 include_directories(${ZLIB_INCLUDE_DIRS})
65 set(SOURCES ${SOURCES} ../../3rdparty/miniz/miniz.c)
69 set(SOURCES ${SOURCES} ../../3rdparty/sha512/sha512.c)
73 add_definitions(-DHAVE_SYSLOG)
77 set(SOURCES ${SOURCES} mac_utils.cpp)
81 set(SOURCES ${SOURCES} logbacktrace_win.cpp)
84 add_definitions(-DHAVE_EXECINFO)
85 include_directories(${EXECINFO_INCLUDES})
87 set(SOURCES ${SOURCES} logbacktrace_unix.cpp)
90 qt_add_resources(SOURCES ${COMMON_RCS})
92 add_library(mod_common STATIC ${SOURCES})
93 qt_use_modules(mod_common Core Network)
96 target_link_libraries(mod_common "-framework CoreServices" "-framework CoreFoundation")
99 target_link_libraries(mod_common ${CMAKE_DL_LIBS} ${EXECINFO_LIBRARIES})
102 target_link_libraries(mod_common ${ZLIB_LIBRARIES})
105 # This is needed so translations are generated before trying to build the qrc.
106 # Should probably find a nicer solution with proper dependencies between the involved files, though...
107 add_dependencies(mod_common po)