1 # Builds the common module
19 # expressionmatchtests.cpp
20 highlightrulemanager.cpp
35 nickhighlightmatcher.cpp
50 serializers/serializers.cpp
52 protocols/datastream/datastreampeer.cpp
53 protocols/legacy/legacypeer.cpp
61 list(APPEND SOURCES qt5cliparser.cpp)
63 list(APPEND SOURCES cliparser.cpp)
66 if (QCA2_FOUND OR QCA2-QT5_FOUND)
67 set(SOURCES ${SOURCES} keyevent.cpp)
71 add_definitions(-DHAVE_ZLIB)
72 include_directories(${ZLIB_INCLUDE_DIRS})
74 set(SOURCES ${SOURCES} ../../3rdparty/miniz/miniz.c)
78 set(SOURCES ${SOURCES} ../../3rdparty/sha512/sha512.c)
82 add_definitions(-DHAVE_SYSLOG)
86 set(SOURCES ${SOURCES} mac_utils.cpp)
90 set(SOURCES ${SOURCES} logbacktrace_win.cpp)
93 add_definitions(-DHAVE_EXECINFO)
94 include_directories(${EXECINFO_INCLUDES})
96 set(SOURCES ${SOURCES} logbacktrace_unix.cpp)
99 qt_add_resources(SOURCES ${COMMON_RCS})
101 add_library(mod_common STATIC ${SOURCES})
102 qt_use_modules(mod_common Core Network)
105 target_link_libraries(mod_common "-framework CoreServices" "-framework CoreFoundation")
108 target_link_libraries(mod_common ${CMAKE_DL_LIBS} ${EXECINFO_LIBRARIES})
111 target_link_libraries(mod_common ${ZLIB_LIBRARIES})
114 # This is needed so translations are generated before trying to build the qrc.
115 # Should probably find a nicer solution with proper dependencies between the involved files, though...
116 add_dependencies(mod_common po)