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
210
211
212
|
# Copyright 2005-2017 The Mumble Developers. All rights reserved.
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file at the root of the
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
include(../mumble.pri)
DEFINES *= MURMUR
TEMPLATE =app
CONFIG *= network
CONFIG -= gui
QT *= network sql xml
QT -= gui
TARGET = murmur
DBFILE = murmur.db
LANGUAGE = C++
FORMS =
HEADERS *= Server.h ServerUser.h Meta.h PBKDF2.h
SOURCES *= main.cpp Server.cpp ServerUser.cpp ServerDB.cpp Register.cpp Cert.cpp Messages.cpp Meta.cpp RPC.cpp PBKDF2.cpp
DIST = DBus.h ServerDB.h ../../icons/murmur.ico Murmur.ice MurmurI.h MurmurIceWrapper.cpp murmur.plist
PRECOMPILED_HEADER = murmur_pch.h
!CONFIG(no-ice) {
CONFIG *= ice
}
!CONFIG(no-dbus):!win32:!macx {
CONFIG *= dbus
}
!CONFIG(no-bonjour) {
CONFIG *= bonjour
}
win32 {
RC_FILE = murmur.rc
CONFIG *= gui
QT *= gui
isEqual(QT_MAJOR_VERSION, 5) {
QT *= widgets
}
RESOURCES *= murmur.qrc
SOURCES *= Tray.cpp About.cpp
HEADERS *= Tray.h About.h
LIBS *= -luser32
QMAKE_POST_LINK = $$QMAKE_POST_LINK$$escape_expand(\\n\\t)$$quote(mt.exe -nologo -updateresource:$(DESTDIR_TARGET);1 -manifest ../mumble/mumble.appcompat.manifest)
}
unix {
contains(UNAME, Linux) {
LIBS *= -lcap
# For MumbleSSL::qsslSanityCheck()
LIBS *= -ldl
}
CONFIG(static):!macx {
QMAKE_LFLAGS *= -static
}
CONFIG(ermine) {
QMAKE_LFLAGS *= -Wl,-rpath,$$(MUMBLE_PREFIX)/lib:$$(MUMBLE_ICE_PREFIX)/lib
}
HEADERS *= UnixMurmur.h
SOURCES *= UnixMurmur.cpp
TARGET = murmurd
}
macx {
CONFIG -= app_bundle
LIBS *= -framework Security
QMAKE_LFLAGS += -sectcreate __TEXT __info_plist murmur.plist
}
dbus {
DEFINES *= USE_DBUS
QT *= dbus
HEADERS *= DBus.h
SOURCES *= DBus.cpp
}
ice {
SOURCES *= MurmurIce.cpp
HEADERS *= MurmurIce.h
win32:CONFIG(debug, debug|release) {
LIBS *= -lIceD -lIceUtilD
} else {
LIBS *= -lIce -lIceUtil
}
DEFINES *= USE_ICE
win32 {
INCLUDEPATH *= "$$ICE_PATH/include"
!CONFIG(static) {
QMAKE_LIBDIR *= "$$ICE_PATH/lib/vc100"
} else {
DEFINES *= ICE_STATIC_LIBS
QMAKE_LIBDIR *= $$BZIP2_PATH/lib
equals(MUMBLE_ARCH, x86) {
QMAKE_LIBDIR *= $$ICE_PATH/lib
}
equals(MUMBLE_ARCH, x86_64) {
QMAKE_LIBDIR *= $$ICE_PATH/lib/x64
}
CONFIG(release, debug|release): LIBS *= -llibbz2
CONFIG(debug, debug|release): LIBS *= -llibbz2d
LIBS *= -ldbghelp -liphlpapi -lrpcrt4
}
}
macx {
INCLUDEPATH *= $$(MUMBLE_PREFIX)/Ice-3.4.2/include/
QMAKE_LIBDIR *= $$(MUMBLE_PREFIX)/Ice-3.4.2/lib/
}
CONFIG(ermine) {
INCLUDEPATH *= $$(MUMBLE_ICE_PREFIX)/include/
QMAKE_LIBDIR *= $$(MUMBLE_ICE_PREFIX)/lib/
}
unix:!macx:CONFIG(static) {
INCLUDEPATH *= /opt/Ice-3.3/include
QMAKE_LIBDIR *= /opt/Ice-3.3/lib
LIBS *= -lbz2
QMAKE_CXXFLAGS *= -fPIC
}
macx:CONFIG(static) {
LIBS *= -lbz2 -liconv
QMAKE_CXXFLAGS *= -fPIC
}
LIBS *= -lmurmur_ice
INCLUDEPATH *= murmur_ice
unix {
QMAKE_CFLAGS *= "-isystem murmur_ice"
QMAKE_CXXFLAGS *= "-isystem murmur_ice"
}
}
grpc {
isEqual(QT_MAJOR_VERSION, 4) {
error("Murmur's gRPC support requires Qt 5")
}
DEFINES *= USE_GRPC
INCLUDEPATH *= murmur_grpc
LIBS *= -lmurmur_grpc
HEADERS *= MurmurGRPCImpl.h
SOURCES *= MurmurGRPCImpl.cpp
GRPC_WRAPPER = MurmurRPC.proto
grpc_wrapper.output = MurmurRPC.proto.Wrapper.cpp
grpc_wrapper.commands = protoc --plugin=${DESTDIR}protoc-gen-murmur-grpcwrapper -I. --murmur-grpcwrapper_out=. MurmurRPC.proto
grpc_wrapper.input = GRPC_WRAPPER
grpc_wrapper.variable_out =
QMAKE_EXTRA_COMPILERS += grpc_wrapper
unix {
QMAKE_CXXFLAGS *= -std=c++11
must_pkgconfig(grpc)
must_pkgconfig(grpc++)
}
}
bonjour {
DEFINES *= USE_BONJOUR
HEADERS *= \
../../3rdparty/qqbonjour-src/BonjourRecord.h \
../../3rdparty/qqbonjour-src/BonjourServiceRegister.h \
BonjourServer.h
SOURCES *= \
../../3rdparty/qqbonjour-src/BonjourServiceRegister.cpp \
BonjourServer.cpp
INCLUDEPATH *= ../../3rdparty/qqbonjour-src
win32 {
INCLUDEPATH *= "$$BONJOUR_PATH/include"
QMAKE_LIBDIR *= "$$BONJOUR_PATH/lib/win32"
LIBS *= -lDNSSD
}
unix:!macx {
system(pkg-config --exists avahi-compat-libdns_sd avahi-client) {
must_pkgconfig(avahi-compat-libdns_sd)
must_pkgconfig(avahi-client)
} else {
LIBS *= -ldns_sd
}
}
}
# Check for QSslDiffieHellmanParameters availability, and define
# USE_QSSLDIFFIEHELLMANPARAMETERS preprocessor if available.
#
# Can be disabled with no-qssldiffiehellmanparameters.
!CONFIG(no-qssldiffiehellmanparameters):exists($$[QT_INSTALL_HEADERS]/QtNetwork/QSslDiffieHellmanParameters) {
# ...but only if we're inside a Mumble build environment for now.
# If someone decides to put a Mumble snapshot into a distro, this
# could break the build in the future, with newer versions of Qt,
# if the API of QSslDiffieHellmanParameters changes when it is
# upstreamed.
CONFIG(buildenv) {
DEFINES += USE_QSSLDIFFIEHELLMANPARAMETERS
}
}
include(../../symbols.pri)
|