/
src.pro
209 lines (191 loc) · 8.06 KB
/
src.pro
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
###############################################################################
#
# This file is part of commhistory-daemon.
#
# Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
# Contact: Reto Zingg <reto.zingg@nokia.com>
#
# This library is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License version 2.1 as
# published by the Free Software Foundation.
#
# This library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
# License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this library; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
###############################################################################
include( ../common-project-config.pri )
include( ../common-vars.pri )
# -----------------------------------------------------------------------------
# target setup
# -----------------------------------------------------------------------------
TARGET = commhistoryd
# -----------------------------------------------------------------------------
# dependencies
# -----------------------------------------------------------------------------
QT += dbus contacts versit
QT -= gui
PKGCONFIG += ngf-qt5 mce nemonotifications-qt5
PKGCONFIG += TelepathyQt5 commhistory-qt5 mlite5 mlocale5
PKGCONFIG += qofono-qt5 qofonoext contactcache-qt5 qtcontacts-sqlite-qt5-extensions
# clock_gettime
LIBS += -lrt
packagesExist(qt5-boostable) {
DEFINES += HAS_BOOSTER
PKGCONFIG += qt5-boostable
} else {
warning("qt5-boostable not available; startup times will be slower")
}
# -----------------------------------------------------------------------------
# input
# -----------------------------------------------------------------------------
HEADERS += logger.h \
channellistener.h \
textchannellistener.h \
streamchannellistener.h \
loggerclientobserver.h \
notificationmanager.h \
serialisable.h \
personalnotification.h \
commhistoryifadaptor.h \
commhistoryservice.h \
locstrings.h \
messagereviver.h \
connectionutils.h \
contactauthorizationlistener.h \
contactauthorizer.h \
constants.h \
accountoperationsobserver.h \
accountpresenceifadaptor.h \
accountpresenceservice.h \
lastdialedcache.h \
debug.h \
fscleanup.h \
mmshandler.h \
mmspart.h \
messagehandlerbase.h \
smartmessaging.h
SOURCES += main.cpp \
logger.cpp \
channellistener.cpp \
textchannellistener.cpp \
streamchannellistener.cpp \
loggerclientobserver.cpp \
notificationmanager.cpp \
serialisable.cpp \
personalnotification.cpp \
commhistoryifadaptor.cpp \
commhistoryservice.cpp \
messagereviver.cpp \
connectionutils.cpp \
contactauthorizationlistener.cpp \
contactauthorizer.cpp \
accountoperationsobserver.cpp \
accountpresenceifadaptor.cpp \
accountpresenceservice.cpp \
lastdialedcache.cpp \
fscleanup.cpp \
mmshandler.cpp \
messagehandlerbase.cpp \
smartmessaging.cpp
DBUS_ADAPTORS += mmshandler
mmshandler.files = org.nemomobile.MmsHandler.xml
mmshandler.header_flags = -i mmspart.h -i mmshandler.h -l MmsHandler
mmshandler.source_flags = -l MmsHandler
# -----------------------------------------------------------------------------
# Telepathy extensions.
# -----------------------------------------------------------------------------
EXTENSIONS_DIR = $$IN_PWD/TpExtensions
EXTENSIONS_GENERATED_DIR = $$EXTENSIONS_DIR/.gen
TOOLS_DIR = $$IN_PWD/../tools
PYTHON = python3
MOC = $$TOOLS_DIR/mocwrapper.sh
XINCLUDATOR = $$TOOLS_DIR/xincludator.py
CONSTANTS_GEN = $$TOOLS_DIR/qt-constants-gen.py
CLIENT_GEN = $$TOOLS_DIR/qt-client-gen.py
HEADERS += TpExtensions/connection.h \
TpExtensions/Connection
SPEC_MAIN_FILES = $$EXTENSIONS_DIR/all.xml \
$$EXTENSIONS_DIR/connection.xml
spec_xml.name = Generating the Telepathy spec
spec_xml.input = SPEC_MAIN_FILES
spec_xml.output = $$EXTENSIONS_GENERATED_DIR/${QMAKE_FILE_IN_BASE}.xml
spec_xml.depends = $$EXTENSIONS_DIR/*.xml \
$$XINCLUDATOR
spec_xml.commands = \
$(MKDIR) $$EXTENSIONS_GENERATED_DIR; \
$$PYTHON $$XINCLUDATOR \
${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}.tmp && \
mv ${QMAKE_FILE_OUT}.tmp ${QMAKE_FILE_OUT}
spec_xml.CONFIG += target_predeps no_link
QMAKE_EXTRA_COMPILERS += spec_xml
GENERATED_ALL_XML = $$EXTENSIONS_GENERATED_DIR/all.xml
constants_h.name = Generating the header for constants
constants_h.input = GENERATED_ALL_XML
constants_h.output = $$EXTENSIONS_GENERATED_DIR/constants.h
constants_h.variable_out = HEADERS
constants_h.depends = $$CONSTANTS_GEN
constants_h.commands = \
$(MKDIR) $$EXTENSIONS_GENERATED_DIR; \
$$PYTHON $$CONSTANTS_GEN \
--namespace='CommHistoryTp' \
--str-constant-prefix='COMM_HISTORY_TP_' \
--specxml=${QMAKE_FILE_IN} \
> ${QMAKE_FILE_OUT}.tmp && \
mv ${QMAKE_FILE_OUT}.tmp ${QMAKE_FILE_OUT}
constants_h.CONFIG += target_predeps
QMAKE_EXTRA_COMPILERS += constants_h
GENERATED_CONNECTION_XML = $$EXTENSIONS_GENERATED_DIR/connection.xml
CLI_CONNECTION_STAMP_FILE = $$EXTENSIONS_GENERATED_DIR/cli-connection.stamp
cli_connection_stamp.name = Generating client files to the Connection interface
cli_connection_stamp.input = GENERATED_CONNECTION_XML
cli_connection_stamp.output = $$CLI_CONNECTION_STAMP_FILE
cli_connection_stamp.depends = $$CLIENT_GEN
cli_connection_stamp.commands = \
$(MKDIR) $$EXTENSIONS_GENERATED_DIR; \
$$PYTHON $$CLIENT_GEN \
--namespace='CommHistoryTp::Client' \
--typesnamespace='CommHistoryTp' \
--headerfile=$$EXTENSIONS_GENERATED_DIR/cli-connection.h \
--implfile=$$EXTENSIONS_GENERATED_DIR/cli-connection.cpp \
--realinclude='$$EXTENSIONS_DIR/connection.h' \
--specxml=$$GENERATED_ALL_XML \
--ifacexml=$$GENERATED_ALL_XML \
--extraincludes='\<TpExtensions/Connection\>' \
--extraincludes='\<TelepathyQt/Connection\>' \
--mainiface='Tp::Client::ConnectionInterface' && \
$$MOC \$(DEFINES) \$(INCPATH) \
$$EXTENSIONS_GENERATED_DIR/cli-connection.h \
-o .moc/moc_cli-connection.cpp && \
touch ${QMAKE_FILE_OUT}
cli_connection_stamp.CONFIG += no_link
QMAKE_EXTRA_COMPILERS += cli_connection_stamp
cli_connection_h.name = Generating ${QMAKE_FILE_OUT}
cli_connection_h.input = CLI_CONNECTION_STAMP_FILE
cli_connection_h.output = $$EXTENSIONS_GENERATED_DIR/cli-connection.h
cli_connection_h.variable_out = HEADERS
cli_connection_h.commands = true
QMAKE_EXTRA_COMPILERS += cli_connection_h
cli_connection_cpp.name = Generating ${QMAKE_FILE_OUT}
cli_connection_cpp.input = CLI_CONNECTION_STAMP_FILE
cli_connection_cpp.output = $$EXTENSIONS_GENERATED_DIR/cli-connection.cpp
cli_connection_cpp.variable_out = SOURCES
cli_connection_cpp.commands = true
QMAKE_EXTRA_COMPILERS += cli_connection_cpp
cli_connection_moc_cpp.name = Generating ${QMAKE_FILE_OUT}
cli_connection_moc_cpp.input = CLI_CONNECTION_STAMP_FILE
cli_connection_moc_cpp.output = .moc/moc_cli-connection.cpp
cli_connection_moc_cpp.variable_out = SOURCES
cli_connection_moc_cpp.commands = true
QMAKE_EXTRA_COMPILERS += cli_connection_moc_cpp
# -----------------------------------------------------------------------------
# common installation setup
# NOTE: remember to set headers.files before this include to have the headers
# properly setup.
# -----------------------------------------------------------------------------
include( ../common-installs-config.pri )