qgroundcontrol.pro 27.5 KB
Newer Older
1 2 3 4 5 6
# -------------------------------------------------
# QGroundControl - Micro Air Vehicle Groundstation
# Please see our website at <http://qgroundcontrol.org>
# Maintainer:
# Lorenz Meier <lm@inf.ethz.ch>
# (c) 2009-2015 QGroundControl Developers
Lorenz Meier's avatar
Lorenz Meier committed
7
# License terms set in COPYING.md
8 9
# -------------------------------------------------

dogmaphobic's avatar
dogmaphobic committed
10
exists($${OUT_PWD}/qgroundcontrol.pro) {
11
    error("You must use shadow build (e.g. mkdir build; cd build; qmake ../qgroundcontrol.pro).")
dogmaphobic's avatar
dogmaphobic committed
12
}
13 14 15

message(Qt version $$[QT_VERSION])

16 17
!equals(QT_MAJOR_VERSION, 5) | !greaterThan(QT_MINOR_VERSION, 4) {
    error("Unsupported Qt version, 5.5+ is required")
18
}
19

20 21
include(QGCCommon.pri)

Daniel Agar's avatar
Daniel Agar committed
22
TARGET   = QGroundControl
23 24 25 26
TEMPLATE = app

DebugBuild {
    DESTDIR  = $${OUT_PWD}/debug
dogmaphobic's avatar
dogmaphobic committed
27
} else {
28 29 30 31 32 33 34 35 36
    DESTDIR  = $${OUT_PWD}/release
}

# Load additional config flags from user_config.pri
exists(user_config.pri):infile(user_config.pri, CONFIG) {
    CONFIG += $$fromfile(user_config.pri, CONFIG)
    message($$sprintf("Using user-supplied additional config: '%1' specified in user_config.pri", $$fromfile(user_config.pri, CONFIG)))
}

dogmaphobic's avatar
dogmaphobic committed
37 38 39 40 41 42 43 44 45 46 47 48
# Bluetooth
contains (DEFINES, QGC_DISABLE_BLUETOOTH) {
    message("Skipping support for Bluetooth (manual override from command line)")
    DEFINES -= QGC_ENABLE_BLUETOOTH
} else:exists(user_config.pri):infile(user_config.pri, DEFINES, QGC_DISABLE_BLUETOOTH) {
    message("Skipping support for Bluetooth (manual override from user_config.pri)")
    DEFINES -= QGC_ENABLE_BLUETOOTH
} else:exists(user_config.pri):infile(user_config.pri, DEFINES, QGC_ENABLE_BLUETOOTH) {
    message("Including support for Bluetooth (manual override from user_config.pri)")
    DEFINES += QGC_ENABLE_BLUETOOTH
}

49 50 51 52 53 54 55
LinuxBuild {
    CONFIG += link_pkgconfig
}

# Qt configuration

CONFIG += qt \
56
    thread \
Daniel Agar's avatar
Daniel Agar committed
57
    c++11 \
58 59 60 61 62 63 64

contains(DEFINES, ENABLE_VERBOSE_OUTPUT) {
    message("Enable verbose compiler output (manual override from command line)")
} else:exists(user_config.pri):infile(user_config.pri, DEFINES, ENABLE_VERBOSE_OUTPUT) {
    message("Enable verbose compiler output (manual override from user_config.pri)")
} else {
CONFIG += \
Daniel Agar's avatar
Daniel Agar committed
65
    silent
66
}
67 68 69 70 71

QT += \
    concurrent \
    gui \
    location \
72
    network \
73 74 75 76 77 78 79 80 81
    opengl \
    positioning \
    qml \
    quick \
    quickwidgets \
    sql \
    svg \
    widgets \
    xml \
82
    multimedia
83 84

!MobileBuild {
dogmaphobic's avatar
dogmaphobic committed
85
QT += \
86 87 88 89
    printsupport \
    serialport \
}

dogmaphobic's avatar
dogmaphobic committed
90
contains(DEFINES, QGC_ENABLE_BLUETOOTH) {
dogmaphobic's avatar
dogmaphobic committed
91 92 93 94
QT += \
    bluetooth \
}

95 96
#  testlib is needed even in release flavor for QSignalSpy support
QT += testlib
97 98 99 100
ReleaseBuild {
    # We don't need the testlib console in release mode
    QT.testlib.CONFIG -= console
}
101 102 103 104 105 106 107 108
#
# OS Specific settings
#

MacBuild {
    QMAKE_INFO_PLIST    = Custom-Info.plist
    ICON                = $${BASEDIR}/resources/icons/macx.icns
    OTHER_FILES        += Custom-Info.plist
109 110 111
equals(QT_MAJOR_VERSION, 5) | greaterThan(QT_MINOR_VERSION, 5) {
    LIBS               += -framework ApplicationServices
}
112 113 114 115 116 117 118 119 120
}

iOSBuild {
    BUNDLE.files        = $$files($$PWD/ios/AppIcon*.png) $$PWD/ios/QGCLaunchScreen.xib
    QMAKE_BUNDLE_DATA  += BUNDLE
    LIBS               += -framework AVFoundation
    #-- Info.plist (need an "official" one for the App Store)
    ForAppStore {
        message(App Store Build)
121 122 123 124 125 126
        #-- Create official, versioned Info.plist
        APP_STORE = $$system(cd $${BASEDIR} && $${BASEDIR}/tools/update_ios_version.sh $${BASEDIR}/ios/iOSForAppStore-Info-Source.plist $${BASEDIR}/ios/iOSForAppStore-Info.plist)
        APP_ERROR = $$find(APP_STORE, "Error")
        count(APP_ERROR, 1) {
            error("Error building .plist file. 'ForAppStore' builds are only possible through the official build system.")
        }
127 128 129 130 131 132 133 134 135 136 137 138 139
        QMAKE_INFO_PLIST  = $${BASEDIR}/ios/iOSForAppStore-Info.plist
        OTHER_FILES      += $${BASEDIR}/ios/iOSForAppStore-Info.plist
    } else {
        QMAKE_INFO_PLIST  = $${BASEDIR}/ios/iOS-Info.plist
        OTHER_FILES      += $${BASEDIR}/ios/iOS-Info.plist
    }
    #-- TODO: Add iTunesArtwork
}

LinuxBuild {
    CONFIG += qesp_linux_udev
}

140 141 142 143
RC_ICONS = resources/icons/qgroundcontrol.ico
QMAKE_TARGET_COMPANY = "qgroundcontrol.org"
QMAKE_TARGET_DESCRIPTION = "Open source ground control app provided by QGroundControl dev team"
QMAKE_TARGET_COPYRIGHT = "Copyright (C) 2016 QGroundControl Development Team. All rights reserved."
Daniel Agar's avatar
Daniel Agar committed
144
QMAKE_TARGET_PRODUCT = "QGroundControl"
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

#
# Build-specific settings
#

DebugBuild {
!iOSBuild {
    CONFIG += console
}
}

!MobileBuild {
# qextserialport should not be used by general QGroundControl code. Use QSerialPort instead. This is only
# here to support special case Firmware Upgrade code.
include(libs/qextserialport/src/qextserialport.pri)
}

#
# Our QtLocation "plugin"
#

include(src/QtLocationPlugin/QGCLocationPlugin.pri)

#
# External library configuration
#

include(QGCExternalLibs.pri)

#
# Main QGroundControl portion of project file
#

RESOURCES += \
    qgroundcontrol.qrc \
    qgcresources.qrc

182 183 184 185 186
DebugBuild {
    # Unit Test resources
    RESOURCES += UnitTest.qrc
}

187 188 189 190 191 192 193 194 195 196 197 198 199 200
DEPENDPATH += \
    . \
    plugins

INCLUDEPATH += .

INCLUDEPATH += \
    include/ui \
    src \
    src/audio \
    src/AutoPilotPlugins \
    src/comm \
    src/FlightDisplay \
    src/FlightMap \
201
    src/FlightMap/Widgets \
202 203
    src/input \
    src/Joystick \
Jimmy Johnson's avatar
Jimmy Johnson committed
204
    src/FollowMe \
205
    src/GPS \
206 207 208 209 210 211 212 213 214 215 216 217 218 219 220
    src/lib/qmapcontrol \
    src/MissionEditor \
    src/MissionManager \
    src/QmlControls \
    src/uas \
    src/ui \
    src/ui/linechart \
    src/ui/map \
    src/ui/mapdisplay \
    src/ui/mission \
    src/ui/px4_configuration \
    src/ui/toolbar \
    src/ui/uas \
    src/VehicleSetup \
    src/ViewWidgets \
dogmaphobic's avatar
dogmaphobic committed
221 222
    src/QtLocationPlugin \
    src/QtLocationPlugin/QMLControl \
Jimmy Johnson's avatar
Jimmy Johnson committed
223
    src/PositionManager \
224 225 226

FORMS += \
    src/ui/MainWindow.ui \
227
    src/QGCQmlWidgetHolder.ui \
228 229 230

!MobileBuild {
FORMS += \
231 232
    src/ui/uas/QGCUnconnectedInfoWidget.ui \
    src/ui/uas/UASMessageView.ui \
233 234
    src/ui/Linechart.ui \
    src/ui/MultiVehicleDockWidget.ui \
235
    src/ui/MAVLinkSettingsWidget.ui \
236 237 238 239 240
    src/ui/QGCDataPlot2D.ui \
    src/ui/QGCHilConfiguration.ui \
    src/ui/QGCHilFlightGearConfiguration.ui \
    src/ui/QGCHilJSBSimConfiguration.ui \
    src/ui/QGCHilXPlaneConfiguration.ui \
241
    src/ui/QGCMapRCToParamDialog.ui \
242
    src/ui/QGCMAVLinkInspector.ui \
243
    src/ui/QGCMAVLinkLogPlayer.ui \
244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261
    src/ui/QGCTabbedInfoView.ui \
    src/ui/QGCUASFileView.ui \
    src/ui/QGCUASFileViewMulti.ui \
    src/ui/uas/UASQuickView.ui \
    src/ui/uas/UASQuickViewItemSelect.ui \
}

HEADERS += \
    src/audio/QGCAudioWorker.h \
    src/CmdLineOptParser.h \
    src/comm/LinkConfiguration.h \
    src/comm/LinkInterface.h \
    src/comm/LinkManager.h \
    src/comm/MAVLinkProtocol.h \
    src/comm/ProtocolInterface.h \
    src/comm/QGCMAVLink.h \
    src/comm/TCPLink.h \
    src/comm/UDPLink.h \
262
    src/FlightDisplay/VideoManager.h \
263
    src/FlightMap/FlightMapSettings.h \
264
    src/FlightMap/Widgets/ValuesWidgetController.h \
265 266 267 268
    src/GAudioOutput.h \
    src/HomePositionManager.h \
    src/Joystick/Joystick.h \
    src/Joystick/JoystickManager.h \
269
    src/VehicleSetup/JoystickConfigController.h \
Jimmy Johnson's avatar
Jimmy Johnson committed
270
    src/FollowMe/FollowMe.h \
Jimmy Johnson's avatar
Jimmy Johnson committed
271
    src/PositionManager/SimulatedPosition.h \
Don Gagne's avatar
Don Gagne committed
272
    src/JsonHelper.h \
273 274
    src/LogCompressor.h \
    src/MG.h \
275
    src/MissionManager/ComplexMissionItem.h \
276 277 278
    src/MissionManager/GeoFenceController.h \
    src/MissionManager/GeoFenceManager.h \
    src/MissionManager/QGCMapPolygon.h \
279
    src/MissionManager/MissionCommandList.h \
280 281
    src/MissionManager/MissionCommandTree.h \
    src/MissionManager/MissionCommandUIInfo.h \
282
    src/MissionManager/MissionController.h \
283 284
    src/MissionManager/MissionItem.h \
    src/MissionManager/MissionManager.h \
285
    src/MissionManager/PlanElementController.h \
286
    src/MissionManager/SimpleMissionItem.h \
287
    src/MissionManager/SurveyMissionItem.h \
288
    src/MissionManager/VisualMissionItem.h \
289 290 291 292 293
    src/QGC.h \
    src/QGCApplication.h \
    src/QGCComboBox.h \
    src/QGCConfig.h \
    src/QGCDockWidget.h \
294
    src/QGCFileDownload.h \
295 296
    src/QGCGeo.h \
    src/QGCLoggingCategory.h \
Don Gagne's avatar
Don Gagne committed
297
    src/QGCMapPalette.h \
Don Gagne's avatar
Don Gagne committed
298
    src/QGCMobileFileDialogController.h \
299 300 301 302 303
    src/QGCPalette.h \
    src/QGCQmlWidgetHolder.h \
    src/QGCQuickWidget.h \
    src/QGCTemporaryFile.h \
    src/QGCToolbox.h \
304
    src/QmlControls/AppMessages.h \
305 306 307
    src/QmlControls/CoordinateVector.h \
    src/QmlControls/MavlinkQmlSingleton.h \
    src/QmlControls/ParameterEditorController.h \
Don Gagne's avatar
Don Gagne committed
308
    src/QmlControls/RCChannelMonitorController.h \
309 310 311 312 313 314 315 316
    src/QmlControls/ScreenToolsController.h \
    src/QmlControls/QGroundControlQmlGlobal.h \
    src/QmlControls/QmlObjectListModel.h \
    src/uas/UAS.h \
    src/uas/UASInterface.h \
    src/uas/UASMessageHandler.h \
    src/ui/toolbar/MainToolBarController.h \
    src/AutoPilotPlugins/PX4/PX4AirframeLoader.h \
317
    src/AutoPilotPlugins/APM/APMAirframeLoader.h \
318
    src/QmlControls/QGCImageProvider.h \
dogmaphobic's avatar
dogmaphobic committed
319
    src/QtLocationPlugin/QMLControl/QGCMapEngineManager.h \
320
    src/PositionManager/PositionManager.h
321

322 323 324 325
AndroidBuild {
HEADERS += \
}

326 327 328 329 330 331 332
DebugBuild {
HEADERS += \
    src/comm/MockLink.h \
    src/comm/MockLinkFileServer.h \
    src/comm/MockLinkMissionItemHandler.h \
}

333 334 335
WindowsBuild {
    PRECOMPILED_HEADER += src/stable_headers.h
    HEADERS += src/stable_headers.h
Daniel Agar's avatar
Daniel Agar committed
336
    CONFIG -= silent
337
    OTHER_FILES += .appveyor.yml
338 339
}

dogmaphobic's avatar
dogmaphobic committed
340
contains(DEFINES, QGC_ENABLE_BLUETOOTH) {
dogmaphobic's avatar
dogmaphobic committed
341 342
    HEADERS += \
    src/comm/BluetoothLink.h \
dogmaphobic's avatar
dogmaphobic committed
343
}
344 345 346

!iOSBuild {
HEADERS += \
347
    src/comm/QGCSerialPortInfo.h \
348 349 350 351 352
    src/comm/SerialLink.h \
}

!MobileBuild {
HEADERS += \
dogmaphobic's avatar
dogmaphobic committed
353
    src/comm/LogReplayLink.h \
354 355 356 357
    src/comm/QGCFlightGearLink.h \
    src/comm/QGCHilLink.h \
    src/comm/QGCJSBSimLink.h \
    src/comm/QGCXPlaneLink.h \
358
    src/Joystick/JoystickSDL.h \
359 360 361
    src/QGCFileDialog.h \
    src/QGCMessageBox.h \
    src/uas/FileManager.h \
362 363 364 365 366 367 368 369
    src/ui/HILDockWidget.h \
    src/ui/linechart/ChartPlot.h \
    src/ui/linechart/IncrementalPlot.h \
    src/ui/linechart/LinechartPlot.h \
    src/ui/linechart/Linecharts.h \
    src/ui/linechart/LinechartWidget.h \
    src/ui/linechart/Scrollbar.h \
    src/ui/linechart/ScrollZoomer.h \
Don Gagne's avatar
Don Gagne committed
370
    src/ui/MainWindow.h \
371 372
    src/ui/MAVLinkDecoder.h \
    src/ui/MAVLinkSettingsWidget.h \
373
    src/ui/MultiVehicleDockWidget.h \
374 375 376 377
    src/ui/QGCMAVLinkLogPlayer.h \
    src/ui/QGCMapRCToParamDialog.h \
    src/ui/uas/UASMessageView.h \
    src/ui/uas/QGCUnconnectedInfoWidget.h \
378 379 380 381 382 383 384 385 386 387 388 389 390 391
    src/ui/QGCDataPlot2D.h \
    src/ui/QGCHilConfiguration.h \
    src/ui/QGCHilFlightGearConfiguration.h \
    src/ui/QGCHilJSBSimConfiguration.h \
    src/ui/QGCHilXPlaneConfiguration.h \
    src/ui/QGCMAVLinkInspector.h \
    src/ui/QGCTabbedInfoView.h \
    src/ui/QGCUASFileView.h \
    src/ui/QGCUASFileViewMulti.h \
    src/ui/uas/UASQuickView.h \
    src/ui/uas/UASQuickViewGaugeItem.h \
    src/ui/uas/UASQuickViewItem.h \
    src/ui/uas/UASQuickViewItemSelect.h \
    src/ui/uas/UASQuickViewTextItem.h \
392 393 394 395 396 397 398 399 400
    src/GPS/Drivers/src/gps_helper.h \
    src/GPS/Drivers/src/ubx.h \
    src/GPS/definitions.h \
    src/GPS/vehicle_gps_position.h \
    src/GPS/satellite_info.h \
    src/GPS/RTCM/RTCMMavlink.h \
    src/GPS/GPSManager.h \
    src/GPS/GPSPositionMessage.h \
    src/GPS/GPSProvider.h \
401 402
    src/ViewWidgets/CustomCommandWidget.h \
    src/ViewWidgets/CustomCommandWidgetController.h \
dogmaphobic's avatar
dogmaphobic committed
403 404
    src/ViewWidgets/LogDownload.h \
    src/ViewWidgets/LogDownloadController.h \
405 406 407
    src/ViewWidgets/ViewWidgetController.h \
}

Don Gagne's avatar
Don Gagne committed
408 409 410 411 412
iOSBuild {
    OBJECTIVE_SOURCES += \
        src/audio/QGCAudioWorker_iOS.mm \
        src/MobileScreenMgr.mm \
}
413

Don Gagne's avatar
Don Gagne committed
414
AndroidBuild {
Don Gagne's avatar
Don Gagne committed
415 416 417 418
    SOURCES += src/MobileScreenMgr.cc \
}


419 420 421 422 423 424
SOURCES += \
    src/audio/QGCAudioWorker.cpp \
    src/CmdLineOptParser.cc \
    src/comm/LinkConfiguration.cc \
    src/comm/LinkManager.cc \
    src/comm/MAVLinkProtocol.cc \
425
    src/comm/QGCMAVLink.cc \
426 427
    src/comm/TCPLink.cc \
    src/comm/UDPLink.cc \
428
    src/FlightDisplay/VideoManager.cc \
429
    src/FlightMap/FlightMapSettings.cc \
430
    src/FlightMap/Widgets/ValuesWidgetController.cc \
431 432 433 434
    src/GAudioOutput.cc \
    src/HomePositionManager.cc \
    src/Joystick/Joystick.cc \
    src/Joystick/JoystickManager.cc \
435
    src/VehicleSetup/JoystickConfigController.cc \
Don Gagne's avatar
Don Gagne committed
436
    src/JsonHelper.cc \
Jimmy Johnson's avatar
Jimmy Johnson committed
437
    src/FollowMe/FollowMe.cc \
438 439
    src/LogCompressor.cc \
    src/main.cc \
440
    src/MissionManager/ComplexMissionItem.cc \
441 442 443
    src/MissionManager/GeoFenceController.cc \
    src/MissionManager/GeoFenceManager.cc \
    src/MissionManager/QGCMapPolygon.cc \
444
    src/MissionManager/MissionCommandList.cc \
445 446
    src/MissionManager/MissionCommandTree.cc \
    src/MissionManager/MissionCommandUIInfo.cc \
447
    src/MissionManager/MissionController.cc \
448 449
    src/MissionManager/MissionItem.cc \
    src/MissionManager/MissionManager.cc \
450
    src/MissionManager/PlanElementController.cc \
451
    src/MissionManager/SimpleMissionItem.cc \
452
    src/MissionManager/SurveyMissionItem.cc \
453
    src/MissionManager/VisualMissionItem.cc \
454 455 456 457
    src/QGC.cc \
    src/QGCApplication.cc \
    src/QGCComboBox.cc \
    src/QGCDockWidget.cc \
458
    src/QGCFileDownload.cc \
459
    src/QGCLoggingCategory.cc \
Don Gagne's avatar
Don Gagne committed
460
    src/QGCMapPalette.cc \
Don Gagne's avatar
Don Gagne committed
461
    src/QGCMobileFileDialogController.cc \
462 463
    src/QGCPalette.cc \
    src/QGCQuickWidget.cc \
464
    src/QGCQmlWidgetHolder.cpp \
465 466 467
    src/QGCTemporaryFile.cc \
    src/QGCToolbox.cc \
    src/QGCGeo.cc \
468
    src/QmlControls/AppMessages.cc \
469 470
    src/QmlControls/CoordinateVector.cc \
    src/QmlControls/ParameterEditorController.cc \
Don Gagne's avatar
Don Gagne committed
471
    src/QmlControls/RCChannelMonitorController.cc \
472 473 474 475 476 477 478
    src/QmlControls/ScreenToolsController.cc \
    src/QmlControls/QGroundControlQmlGlobal.cc \
    src/QmlControls/QmlObjectListModel.cc \
    src/uas/UAS.cc \
    src/uas/UASMessageHandler.cc \
    src/ui/toolbar/MainToolBarController.cc \
    src/AutoPilotPlugins/PX4/PX4AirframeLoader.cc \
479
    src/AutoPilotPlugins/APM/APMAirframeLoader.cc \
480
    src/QmlControls/QGCImageProvider.cc \
dogmaphobic's avatar
dogmaphobic committed
481
    src/QtLocationPlugin/QMLControl/QGCMapEngineManager.cc \
Jimmy Johnson's avatar
Jimmy Johnson committed
482
    src/PositionManager/SimulatedPosition.cc \
483
    src/PositionManager/PositionManager.cpp
484

485 486 487 488 489 490 491
DebugBuild {
SOURCES += \
    src/comm/MockLink.cc \
    src/comm/MockLinkFileServer.cc \
    src/comm/MockLinkMissionItemHandler.cc \
}

492 493
!iOSBuild {
SOURCES += \
494
    src/comm/QGCSerialPortInfo.cc \
495 496 497
    src/comm/SerialLink.cc \
}

dogmaphobic's avatar
dogmaphobic committed
498
contains(DEFINES, QGC_ENABLE_BLUETOOTH) {
dogmaphobic's avatar
dogmaphobic committed
499 500 501 502
    SOURCES += \
    src/comm/BluetoothLink.cc \
}

503 504
!MobileBuild {
SOURCES += \
505 506 507 508 509 510
    src/ui/uas/UASMessageView.cc \
    src/uas/FileManager.cc \
    src/ui/uas/QGCUnconnectedInfoWidget.cc \
    src/ui/MAVLinkDecoder.cc \
    src/ui/MAVLinkSettingsWidget.cc \
    src/ui/QGCMapRCToParamDialog.cpp \
dogmaphobic's avatar
dogmaphobic committed
511
    src/comm/LogReplayLink.cc \
512
    src/QGCFileDialog.cc \
dogmaphobic's avatar
dogmaphobic committed
513
    src/ui/QGCMAVLinkLogPlayer.cc \
514 515 516
    src/comm/QGCFlightGearLink.cc \
    src/comm/QGCJSBSimLink.cc \
    src/comm/QGCXPlaneLink.cc \
517
    src/Joystick/JoystickSDL.cc \
518 519 520 521 522 523 524 525
    src/ui/HILDockWidget.cc \
    src/ui/linechart/ChartPlot.cc \
    src/ui/linechart/IncrementalPlot.cc \
    src/ui/linechart/LinechartPlot.cc \
    src/ui/linechart/Linecharts.cc \
    src/ui/linechart/LinechartWidget.cc \
    src/ui/linechart/Scrollbar.cc \
    src/ui/linechart/ScrollZoomer.cc \
Don Gagne's avatar
Don Gagne committed
526
    src/ui/MainWindow.cc \
527 528 529 530 531 532 533 534 535 536 537 538 539 540 541
    src/ui/MultiVehicleDockWidget.cc \
    src/ui/QGCDataPlot2D.cc \
    src/ui/QGCHilConfiguration.cc \
    src/ui/QGCHilFlightGearConfiguration.cc \
    src/ui/QGCHilJSBSimConfiguration.cc \
    src/ui/QGCHilXPlaneConfiguration.cc \
    src/ui/QGCMAVLinkInspector.cc \
    src/ui/QGCTabbedInfoView.cpp \
    src/ui/QGCUASFileView.cc \
    src/ui/QGCUASFileViewMulti.cc \
    src/ui/uas/UASQuickView.cc \
    src/ui/uas/UASQuickViewGaugeItem.cc \
    src/ui/uas/UASQuickViewItem.cc \
    src/ui/uas/UASQuickViewItemSelect.cc \
    src/ui/uas/UASQuickViewTextItem.cc \
542 543 544 545 546
    src/GPS/Drivers/src/gps_helper.cpp \
    src/GPS/Drivers/src/ubx.cpp \
    src/GPS/RTCM/RTCMMavlink.cc \
    src/GPS/GPSManager.cc \
    src/GPS/GPSProvider.cc \
547 548
    src/ViewWidgets/CustomCommandWidget.cc \
    src/ViewWidgets/CustomCommandWidgetController.cc \
dogmaphobic's avatar
dogmaphobic committed
549 550
    src/ViewWidgets/LogDownload.cc \
    src/ViewWidgets/LogDownloadController.cc \
551
    src/ViewWidgets/ViewWidgetController.cc
552 553 554 555 556 557
}

#
# Unit Test specific configuration goes here
#

558
DebugBuild {
559 560 561 562 563 564 565 566 567 568 569 570 571

HEADERS += src/QmlControls/QmlTestWidget.h
SOURCES += src/QmlControls/QmlTestWidget.cc

!MobileBuild {

INCLUDEPATH += \
    src/qgcunittest

HEADERS += \
    src/FactSystem/FactSystemTestBase.h \
    src/FactSystem/FactSystemTestGeneric.h \
    src/FactSystem/FactSystemTestPX4.h \
572
    src/MissionManager/ComplexMissionItemTest.h \
573
    src/MissionManager/MissionCommandTreeTest.h \
574 575
    src/MissionManager/MissionControllerTest.h \
    src/MissionManager/MissionControllerManagerTest.h \
576
    src/MissionManager/MissionItemTest.h \
577
    src/MissionManager/MissionManagerTest.h \
578
    src/MissionManager/SimpleMissionItemTest.h \
579 580 581 582 583 584 585 586 587
    src/qgcunittest/GeoTest.h \
    src/qgcunittest/FileDialogTest.h \
    src/qgcunittest/FileManagerTest.h \
    src/qgcunittest/FlightGearTest.h \
    src/qgcunittest/LinkManagerTest.h \
    src/qgcunittest/MainWindowTest.h \
    src/qgcunittest/MavlinkLogTest.h \
    src/qgcunittest/MessageBoxTest.h \
    src/qgcunittest/MultiSignalSpy.h \
588
    src/qgcunittest/ParameterLoaderTest.h \
Don Gagne's avatar
Don Gagne committed
589
    src/qgcunittest/RadioConfigTest.h \
590 591 592
    src/qgcunittest/TCPLinkTest.h \
    src/qgcunittest/TCPLoopBackServer.h \
    src/qgcunittest/UnitTest.h \
593
    src/ViewWidgets/LogDownloadTest.h \
594 595 596 597 598 599
    src/VehicleSetup/SetupViewTest.h \

SOURCES += \
    src/FactSystem/FactSystemTestBase.cc \
    src/FactSystem/FactSystemTestGeneric.cc \
    src/FactSystem/FactSystemTestPX4.cc \
600
    src/MissionManager/ComplexMissionItemTest.cc \
601
    src/MissionManager/MissionCommandTreeTest.cc \
602 603
    src/MissionManager/MissionControllerTest.cc \
    src/MissionManager/MissionControllerManagerTest.cc \
604
    src/MissionManager/MissionItemTest.cc \
605
    src/MissionManager/MissionManagerTest.cc \
606
    src/MissionManager/SimpleMissionItemTest.cc \
607 608 609 610 611 612 613 614 615
    src/qgcunittest/GeoTest.cc \
    src/qgcunittest/FileDialogTest.cc \
    src/qgcunittest/FileManagerTest.cc \
    src/qgcunittest/FlightGearTest.cc \
    src/qgcunittest/LinkManagerTest.cc \
    src/qgcunittest/MainWindowTest.cc \
    src/qgcunittest/MavlinkLogTest.cc \
    src/qgcunittest/MessageBoxTest.cc \
    src/qgcunittest/MultiSignalSpy.cc \
616
    src/qgcunittest/ParameterLoaderTest.cc \
Don Gagne's avatar
Don Gagne committed
617
    src/qgcunittest/RadioConfigTest.cc \
618 619 620
    src/qgcunittest/TCPLinkTest.cc \
    src/qgcunittest/TCPLoopBackServer.cc \
    src/qgcunittest/UnitTest.cc \
dogmaphobic's avatar
dogmaphobic committed
621
    src/qgcunittest/UnitTestList.cc \
622
    src/ViewWidgets/LogDownloadTest.cc \
623
    src/VehicleSetup/SetupViewTest.cc \
624 625
} # !MobileBuild
} # DebugBuild
626 627 628 629 630 631

#
# Firmware Plugin Support
#

INCLUDEPATH += \
632
    src/AutoPilotPlugins/APM \
Don Gagne's avatar
Don Gagne committed
633
    src/AutoPilotPlugins/Common \
634 635
    src/AutoPilotPlugins/PX4 \
    src/FirmwarePlugin \
636 637
    src/FirmwarePlugin/APM \
    src/FirmwarePlugin/PX4 \
638 639 640 641 642 643 644 645
    src/Vehicle \
    src/VehicleSetup \

HEADERS+= \
    src/AutoPilotPlugins/AutoPilotPlugin.h \
    src/AutoPilotPlugins/AutoPilotPluginManager.h \
    src/AutoPilotPlugins/APM/APMAutoPilotPlugin.h \
    src/AutoPilotPlugins/APM/APMAirframeComponent.h \
646 647
    src/AutoPilotPlugins/APM/APMAirframeComponentController.h \
    src/AutoPilotPlugins/APM/APMAirframeComponentAirframes.h \
Don Gagne's avatar
Don Gagne committed
648
    src/AutoPilotPlugins/APM/APMCameraComponent.h \
649
    src/AutoPilotPlugins/APM/APMCompassCal.h \
Don Gagne's avatar
Don Gagne committed
650 651
    src/AutoPilotPlugins/APM/APMFlightModesComponent.h \
    src/AutoPilotPlugins/APM/APMFlightModesComponentController.h \
Don Gagne's avatar
Don Gagne committed
652 653
    src/AutoPilotPlugins/APM/APMPowerComponent.h \
    src/AutoPilotPlugins/APM/APMRadioComponent.h \
Don Gagne's avatar
Don Gagne committed
654
    src/AutoPilotPlugins/APM/APMSafetyComponent.h \
Don Gagne's avatar
Don Gagne committed
655 656
    src/AutoPilotPlugins/APM/APMSensorsComponent.h \
    src/AutoPilotPlugins/APM/APMSensorsComponentController.h \
Don Gagne's avatar
Don Gagne committed
657
    src/AutoPilotPlugins/APM/APMTuningComponent.h \
Don Gagne's avatar
Don Gagne committed
658
    src/AutoPilotPlugins/Common/MotorComponent.h \
Don Gagne's avatar
Don Gagne committed
659
    src/AutoPilotPlugins/Common/RadioComponentController.h \
dogmaphobic's avatar
dogmaphobic committed
660
    src/AutoPilotPlugins/Common/ESP8266ComponentController.h \
661
    src/AutoPilotPlugins/Common/ESP8266Component.h \
662 663 664 665 666
    src/AutoPilotPlugins/Generic/GenericAutoPilotPlugin.h \
    src/AutoPilotPlugins/PX4/AirframeComponent.h \
    src/AutoPilotPlugins/PX4/AirframeComponentAirframes.h \
    src/AutoPilotPlugins/PX4/AirframeComponentController.h \
    src/AutoPilotPlugins/PX4/FlightModesComponent.h \
Don Gagne's avatar
Don Gagne committed
667 668
    src/AutoPilotPlugins/PX4/PX4AdvancedFlightModesController.h \
    src/AutoPilotPlugins/PX4/PX4SimpleFlightModesController.h \
669 670 671
    src/AutoPilotPlugins/PX4/PowerComponent.h \
    src/AutoPilotPlugins/PX4/PowerComponentController.h \
    src/AutoPilotPlugins/PX4/PX4AutoPilotPlugin.h \
Don Gagne's avatar
Don Gagne committed
672
    src/AutoPilotPlugins/PX4/PX4RadioComponent.h \
673
    src/AutoPilotPlugins/PX4/CameraComponent.h \
674 675 676
    src/AutoPilotPlugins/PX4/SafetyComponent.h \
    src/AutoPilotPlugins/PX4/SensorsComponent.h \
    src/AutoPilotPlugins/PX4/SensorsComponentController.h \
Don Gagne's avatar
Don Gagne committed
677
    src/AutoPilotPlugins/PX4/PX4TuningComponent.h \
678 679 680 681 682 683 684
    src/FirmwarePlugin/FirmwarePluginManager.h \
    src/FirmwarePlugin/FirmwarePlugin.h \
    src/FirmwarePlugin/APM/APMFirmwarePlugin.h \
    src/FirmwarePlugin/APM/APMParameterMetaData.h \
    src/FirmwarePlugin/APM/ArduCopterFirmwarePlugin.h \
    src/FirmwarePlugin/APM/ArduPlaneFirmwarePlugin.h \
    src/FirmwarePlugin/APM/ArduRoverFirmwarePlugin.h \
685
    src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.h \
Daniel Agar's avatar
Daniel Agar committed
686
    src/FirmwarePlugin/PX4/px4_custom_mode.h \
687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706
    src/FirmwarePlugin/PX4/PX4FirmwarePlugin.h \
    src/FirmwarePlugin/PX4/PX4ParameterMetaData.h \
    src/Vehicle/MultiVehicleManager.h \
    src/Vehicle/Vehicle.h \
    src/VehicleSetup/VehicleComponent.h \

!MobileBuild {
HEADERS += \
    src/VehicleSetup/FirmwareUpgradeController.h \
    src/VehicleSetup/Bootloader.h \
    src/VehicleSetup/PX4FirmwareUpgradeThread.h \
    src/VehicleSetup/FirmwareImage.h \

}

SOURCES += \
    src/AutoPilotPlugins/AutoPilotPlugin.cc \
    src/AutoPilotPlugins/AutoPilotPluginManager.cc \
    src/AutoPilotPlugins/APM/APMAutoPilotPlugin.cc \
    src/AutoPilotPlugins/APM/APMAirframeComponent.cc \
707
    src/AutoPilotPlugins/APM/APMAirframeComponentController.cc \
Don Gagne's avatar
Don Gagne committed
708
    src/AutoPilotPlugins/APM/APMCameraComponent.cc \
709
    src/AutoPilotPlugins/APM/APMCompassCal.cc \
Don Gagne's avatar
Don Gagne committed
710 711
    src/AutoPilotPlugins/APM/APMFlightModesComponent.cc \
    src/AutoPilotPlugins/APM/APMFlightModesComponentController.cc \
Don Gagne's avatar
Don Gagne committed
712 713
    src/AutoPilotPlugins/APM/APMPowerComponent.cc \
    src/AutoPilotPlugins/APM/APMRadioComponent.cc \
Don Gagne's avatar
Don Gagne committed
714
    src/AutoPilotPlugins/APM/APMSafetyComponent.cc \
Don Gagne's avatar
Don Gagne committed
715 716
    src/AutoPilotPlugins/APM/APMSensorsComponent.cc \
    src/AutoPilotPlugins/APM/APMSensorsComponentController.cc \
Don Gagne's avatar
Don Gagne committed
717
    src/AutoPilotPlugins/APM/APMTuningComponent.cc \
Don Gagne's avatar
Don Gagne committed
718
    src/AutoPilotPlugins/Common/MotorComponent.cc \
Don Gagne's avatar
Don Gagne committed
719
    src/AutoPilotPlugins/Common/RadioComponentController.cc \
dogmaphobic's avatar
dogmaphobic committed
720
    src/AutoPilotPlugins/Common/ESP8266ComponentController.cc \
721
    src/AutoPilotPlugins/Common/ESP8266Component.cc \
722
    src/AutoPilotPlugins/APM/APMAirframeComponentAirframes.cc \
723 724 725 726 727
    src/AutoPilotPlugins/Generic/GenericAutoPilotPlugin.cc \
    src/AutoPilotPlugins/PX4/AirframeComponent.cc \
    src/AutoPilotPlugins/PX4/AirframeComponentAirframes.cc \
    src/AutoPilotPlugins/PX4/AirframeComponentController.cc \
    src/AutoPilotPlugins/PX4/FlightModesComponent.cc \
Don Gagne's avatar
Don Gagne committed
728 729
    src/AutoPilotPlugins/PX4/PX4AdvancedFlightModesController.cc \
    src/AutoPilotPlugins/PX4/PX4SimpleFlightModesController.cc \
730 731 732
    src/AutoPilotPlugins/PX4/PowerComponent.cc \
    src/AutoPilotPlugins/PX4/PowerComponentController.cc \
    src/AutoPilotPlugins/PX4/PX4AutoPilotPlugin.cc \
Don Gagne's avatar
Don Gagne committed
733
    src/AutoPilotPlugins/PX4/PX4RadioComponent.cc \
734
    src/AutoPilotPlugins/PX4/CameraComponent.cc \
735 736 737
    src/AutoPilotPlugins/PX4/SafetyComponent.cc \
    src/AutoPilotPlugins/PX4/SensorsComponent.cc \
    src/AutoPilotPlugins/PX4/SensorsComponentController.cc \
Don Gagne's avatar
Don Gagne committed
738
    src/AutoPilotPlugins/PX4/PX4TuningComponent.cc \
739 740 741 742 743
    src/FirmwarePlugin/APM/APMFirmwarePlugin.cc \
    src/FirmwarePlugin/APM/APMParameterMetaData.cc \
    src/FirmwarePlugin/APM/ArduCopterFirmwarePlugin.cc \
    src/FirmwarePlugin/APM/ArduPlaneFirmwarePlugin.cc \
    src/FirmwarePlugin/APM/ArduRoverFirmwarePlugin.cc \
744
    src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.cc \
745
    src/FirmwarePlugin/FirmwarePlugin.cc \
746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769
    src/FirmwarePlugin/FirmwarePluginManager.cc \
    src/FirmwarePlugin/PX4/PX4FirmwarePlugin.cc \
    src/FirmwarePlugin/PX4/PX4ParameterMetaData.cc \
    src/Vehicle/MultiVehicleManager.cc \
    src/Vehicle/Vehicle.cc \
    src/VehicleSetup/VehicleComponent.cc \

!MobileBuild {
SOURCES += \
    src/VehicleSetup/FirmwareUpgradeController.cc \
    src/VehicleSetup/Bootloader.cc \
    src/VehicleSetup/PX4FirmwareUpgradeThread.cc \
    src/VehicleSetup/FirmwareImage.cc \

}

# Fact System code

INCLUDEPATH += \
    src/FactSystem \
    src/FactSystem/FactControls \

HEADERS += \
    src/FactSystem/Fact.h \
Don Gagne's avatar
Don Gagne committed
770
    src/FactSystem/FactGroup.h \
771
    src/FactSystem/FactControls/FactPanelController.h \
772 773 774 775
    src/FactSystem/FactMetaData.h \
    src/FactSystem/FactSystem.h \
    src/FactSystem/FactValidator.h \
    src/FactSystem/ParameterLoader.h \
776
    src/FactSystem/SettingsFact.h \
777 778 779

SOURCES += \
    src/FactSystem/Fact.cc \
Don Gagne's avatar
Don Gagne committed
780
    src/FactSystem/FactGroup.cc \
781
    src/FactSystem/FactControls/FactPanelController.cc \
782 783 784 785
    src/FactSystem/FactMetaData.cc \
    src/FactSystem/FactSystem.cc \
    src/FactSystem/FactValidator.cc \
    src/FactSystem/ParameterLoader.cc \
786
    src/FactSystem/SettingsFact.cc \
787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806

#-------------------------------------------------------------------------------------
# Video Streaming

INCLUDEPATH += \
    src/VideoStreaming

HEADERS += \
    src/VideoStreaming/VideoItem.h \
    src/VideoStreaming/VideoReceiver.h \
    src/VideoStreaming/VideoStreaming.h \
    src/VideoStreaming/VideoSurface.h \
    src/VideoStreaming/VideoSurface_p.h \

SOURCES += \
    src/VideoStreaming/VideoItem.cc \
    src/VideoStreaming/VideoReceiver.cc \
    src/VideoStreaming/VideoStreaming.cc \
    src/VideoStreaming/VideoSurface.cc \

807
contains (CONFIG, DISABLE_VIDEOSTREAMING) {
808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859
    message("Skipping support for video streaming (manual override from command line)")
# 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_VIDEOSTREAMING) {
    message("Skipping support for video streaming (manual override from user_config.pri)")
} else {
    include(src/VideoStreaming/VideoStreaming.pri)
}

#-------------------------------------------------------------------------------------
# Android

AndroidBuild {
    include($$PWD/libs/qtandroidserialport/src/qtandroidserialport.pri)
    message("Adding Serial Java Classes")
    QT += androidextras
    ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android
    OTHER_FILES += \
        $$PWD/android/AndroidManifest.xml \
        $$PWD/android/res/xml/device_filter.xml \
        $$PWD/android/src/com/hoho/android/usbserial/driver/CdcAcmSerialDriver.java \
        $$PWD/android/src/com/hoho/android/usbserial/driver/CommonUsbSerialDriver.java \
        $$PWD/android/src/com/hoho/android/usbserial/driver/Cp2102SerialDriver.java \
        $$PWD/android/src/com/hoho/android/usbserial/driver/FtdiSerialDriver.java \
        $$PWD/android/src/com/hoho/android/usbserial/driver/ProlificSerialDriver.java \
        $$PWD/android/src/com/hoho/android/usbserial/driver/UsbId.java \
        $$PWD/android/src/com/hoho/android/usbserial/driver/UsbSerialDriver.java \
        $$PWD/android/src/com/hoho/android/usbserial/driver/UsbSerialProber.java \
        $$PWD/android/src/com/hoho/android/usbserial/driver/UsbSerialRuntimeException.java \
        $$PWD/android/src/org/qgroundcontrol/qgchelper/UsbDeviceJNI.java \
        $$PWD/android/src/org/qgroundcontrol/qgchelper/UsbIoManager.java

    DISTFILES += \
        android/gradle/wrapper/gradle-wrapper.jar \
        android/gradlew \
        android/res/values/libs.xml \
        android/build.gradle \
        android/gradle/wrapper/gradle-wrapper.properties \
        android/gradlew.bat
}

#-------------------------------------------------------------------------------------
#
# Post link configuration
#

include(QGCSetup.pri)

#
# Installer targets
#

include(QGCInstaller.pri)