forked from ArduPilot/apm_planner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
QGCExternalLibs.pri
341 lines (279 loc) · 7.98 KB
/
QGCExternalLibs.pri
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
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
#
# Tell the Linux build to look in a few additional places for libs
#
LinuxBuild {
LIBS += \
-L/usr/lib
linux-g++-64 {
LIBS += \
-L/usr/local/lib64 \
-L/usr/lib64
}
}
# BSD Build settings
OpenBSDBuild {
INCLUDEPATH += \
/usr/local/include \
/usr/local/include/SDL2 \
/usr/X11R6/include \
/usr/X11R6/include
LIBS += \
-L/usr/lib \
-lSDL2 \
-L/usr/local/lib \
-L/usr/X11R6/lib
exists(/usr/local/include/flite/flite.h) {
message(Adding Flite Support)
LIBS += \
-lflite_cmu_us_kal \
-lflite_usenglish \
-lflite_cmulex \
-lflite
} else {
message(Skipping Flite Support)
DEFINES -= FLITE_AUDIO_ENABLED
}
}
#
# Add in a few missing headers to windows
#
WindowsBuild {
INCLUDEPATH += libs/lib/msinttypes
}
#
# MAVLink (Set for MAVLink 2.0)
#
MAVLINKPATH_REL = libs/mavlink/include/mavlink/v2.0
MAVLINKPATH = $$BASEDIR/$$MAVLINKPATH_REL
MAVLINK_CONF = ardupilotmega
# First we select the dialect, checking for valid user selection
# Users can override all other settings by specifying MAVLINK_CONF as an argument to qmake
!isEmpty(MAVLINK_CONF) {
message($$sprintf("Using MAVLink dialect '%1'.", $$MAVLINK_CONF))
}
# Then we add the proper include paths dependent on the dialect.
INCLUDEPATH += $$MAVLINKPATH
exists($$MAVLINKPATH/common) {
!isEmpty(MAVLINK_CONF) {
count(MAVLINK_CONF, 1) {
exists($$MAVLINKPATH/$$MAVLINK_CONF) {
INCLUDEPATH += $$MAVLINKPATH/$$MAVLINK_CONF
DEFINES += $$sprintf('QGC_USE_%1_MESSAGES', $$upper($$MAVLINK_CONF))
} else {
error($$sprintf("MAVLink dialect '%1' does not exist at '%2'!", $$MAVLINK_CONF, $$MAVLINKPATH_REL))
}
} else {
error(Only a single mavlink dialect can be specified in MAVLINK_CONF)
}
} else {
INCLUDEPATH += $$MAVLINKPATH/common
}
} else {
error($$sprintf("MAVLink folder does not exist at '%1'! Run 'git submodule init && git submodule update' on the command line.",$$MAVLINKPATH_REL))
}
#
# Google Earth
#
MacBuild | WindowsBuild : contains(GOOGLEEARTH, enable) { #fix this to make sense ;)
message(Including support for Google Earth)
HEADERS += src/ui/map3D/QGCGoogleEarthView.h
SOURCES += src/ui/map3D/QGCGoogleEarthView.cc
WindowsBuild {
CONFIG += qaxcontainer
}
} else {
message(Skipping support for Google Earth)
}
#
# libfreenect Kinect support
#
MacBuild | LinuxBuild {
exists(/opt/local/include/libfreenect) | exists(/usr/local/include/libfreenect) {
message("Including support for libfreenect")
#INCLUDEPATH += /usr/include/libusb-1.0
DEFINES += QGC_LIBFREENECT_ENABLED
LIBS += -lfreenect
HEADERS += src/input/Freenect.h
SOURCES += src/input/Freenect.cc
} else {
message("Skipping support for libfreenect")
}
} else {
message("Skipping support for libfreenect")
}
#
# AGLLIB math library
#
include(libs/alglib/alglib.pri)
DEFINES += NOMINMAX
#
# OPMapControl library (from OpenPilot)
#
#include(libs/utils/utils_external.pri)
include(libs/opmapcontrol/opmapcontrol_external.pri)
DEPENDPATH += \
libs/utils \
libs/utils/src \
libs/opmapcontrol \
libs/opmapcontrol/src \
libs/opmapcontrol/src/mapwidget
INCLUDEPATH += \
libs/utils \
libs \
libs/opmapcontrol
WindowsBuild {
# Used to enumerate serial ports by QSerialPort
LIBS += -lsetupapi
}
#
# Zip Access Tool (http://quazip.sourceforge.net)
#
include (libs/thirdParty/quazip/quazip.pri)
#
# XBee wireless
#
WindowsBuild {
#message(Including support for XBee)
#DEFINES += XBEELINK
#INCLUDEPATH += libs/thirdParty/libxbee
#HEADERS += \
# src/comm/XbeeLinkInterface.h \
# src/comm/XbeeLink.h \
# src/comm/HexSpinBox.h \
# src/ui/XbeeConfigurationWindow.h \
# src/comm/CallConv.h
#SOURCES += \
# src/comm/XbeeLink.cpp \
# src/comm/HexSpinBox.cpp \
# src/ui/XbeeConfigurationWindow.cpp
#WindowsBuild {
# LIBS += -llibs/thirdParty/libxbee/lib/libxbee
#}
#LinuxBuild {
# LIBS += -lxbee
#}
} else:WindowsCrossBuild {
#LIBS += -llibs/thirdParty/libxbee/lib/libxbee
message(Skipping support for XBee)
} else {
message(Skipping support for XBee)
}
#
# [OPTIONAL] Magellan 3DxWare library. Provides support for 3DConnexion's 3D mice.
#
contains(DEFINES, DISABLE_3DMOUSE) {
message("Skipping support for Magellan 3DxWare (manual override from command line)")
DEFINES -= DISABLE_3DMOUSE
# Otherwise the user can still disable this feature in the user_config.pri file.
} else:exists(user_config.pri):infile(user_config.pri, DEFINES, DISABLE_3DMOUSE) {
message("Skipping support for 3DConnexion mice (manual override from user_config.pri)")
} else:LinuxBuild {
exists(/usr/local/lib/libxdrvlib.so) {
message("Including support for Magellan 3DxWare")
DEFINES += MOUSE_ENABLED_LINUX
DEFINES += ParameterCheck
# Hack: Has to be defined for magellan usage
INCLUDEPATH *= /usr/local/include
HEADERS += src/input/Mouse6dofInput.h
SOURCES += src/input/Mouse6dofInput.cpp
LIBS += -L/usr/local/lib/ -lxdrvlib
} else {
warning("Skipping support for Magellan 3DxWare (missing libraries, see README)")
}
} else:WindowsBuild {
message("Including support for Magellan 3DxWare")
DEFINES += MOUSE_ENABLED_WIN
INCLUDEPATH += libs/thirdParty/3DMouse/win
HEADERS += \
libs/thirdParty/3DMouse/win/I3dMouseParams.h \
libs/thirdParty/3DMouse/win/MouseParameters.h \
libs/thirdParty/3DMouse/win/Mouse3DInput.h \
src/input/Mouse6dofInput.h
SOURCES += \
libs/thirdParty/3DMouse/win/MouseParameters.cpp \
libs/thirdParty/3DMouse/win/Mouse3DInput.cpp \
src/input/Mouse6dofInput.cpp
} else {
message("Skipping support for Magellan 3DxWare (unsupported platform)")
}
#
# Opal RT-LAB Library
#
WindowsBuild : win32 : exists(src/lib/opalrt/OpalApi.h) : exists(C:/OPAL-RT/RT-LAB7.2.4/Common/bin) {
message("Including support for Opal-RT")
DEFINES += OPAL_RT
INCLUDEPATH +=
src/lib/opalrt
libs/lib/opal/include \
FORMS += src/ui/OpalLinkSettings.ui
HEADERS += \
src/comm/OpalRT.h \
src/comm/OpalLink.h \
src/comm/Parameter.h \
src/comm/QGCParamID.h \
src/comm/ParameterList.h \
src/ui/OpalLinkConfigurationWindow.h
SOURCES += \
src/comm/OpalRT.cc \
src/comm/OpalLink.cc \
src/comm/Parameter.cc \
src/comm/QGCParamID.cc \
src/comm/ParameterList.cc \
src/ui/OpalLinkConfigurationWindow.cc
LIBS += \
-LC:/OPAL-RT/RT-LAB7.2.4/Common/bin \
-lOpalApi
} else {
message("Skipping support for Opal-RT")
}
#
# SDL
#
MacBuild {
INCLUDEPATH += \
$$BASEDIR/libs/lib/Frameworks/SDL2.framework/Headers
LIBS += \
-F$$BASEDIR/libs/lib/Frameworks \
-framework SDL2
}
LinuxBuild {
LIBS += \
-lSDL2
}
WindowsBuild{
INCLUDEPATH += \
$$BASEDIR/libs/lib/sdl/msvc/include \
contains(QT_ARCH, i386) {
LIBS += \
-L$$BASEDIR/libs/lib/sdl/msvc/lib/x86 \
-lSDL2main \
-lSDL2
}else {
LIBS += \
-L$$BASEDIR/libs/lib/sdl/msvc/lib/x64 \
-lSDL2main \
-lSDL2
}
}
WindowsCrossBuild {
INCLUDEPATH += \
$$BASEDIR/libs/lib/sdl/include \
LIBS += \
-L$$BASEDIR/libs/lib/sdl/win32 \
-lSDL2
}
#
# Festival Lite speech synthesis engine
#
LinuxBuild{
exists(/usr/include/flite/flite.h){
LIBS += \
-lflite_cmu_us_kal \
-lflite_usenglish \
-lflite_cmulex \
-lflite
} else {
message(Skipping Flite Support)
DEFINES -= FLITE_AUDIO_ENABLED
}
}