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

10 11
QMAKE_PROJECT_DEPTH = 0 # undocumented qmake flag to force absolute paths in make files

12 13 14 15
# These are disabled until proven correct
DEFINES += QGC_GST_TAISYNC_DISABLED
DEFINES += QGC_GST_MICROHARD_DISABLED

dogmaphobic's avatar
dogmaphobic committed
16
exists($${OUT_PWD}/qgroundcontrol.pro) {
17
    error("You must use shadow build (e.g. mkdir build; cd build; qmake ../qgroundcontrol.pro).")
dogmaphobic's avatar
dogmaphobic committed
18
}
19 20 21

message(Qt version $$[QT_VERSION])

22
!equals(QT_MAJOR_VERSION, 5) | !greaterThan(QT_MINOR_VERSION, 10) {
23
    error("Unsupported Qt version, 5.11+ is required")
24
}
25

26 27
include(QGCCommon.pri)

Daniel Agar's avatar
Daniel Agar committed
28
TARGET   = QGroundControl
29
TEMPLATE = app
30
QGCROOT  = $$PWD
31 32 33

DebugBuild {
    DESTDIR  = $${OUT_PWD}/debug
dogmaphobic's avatar
dogmaphobic committed
34
} else {
35 36 37
    DESTDIR  = $${OUT_PWD}/release
}

Gus Grubba's avatar
Gus Grubba committed
38 39
QML_IMPORT_PATH += $$PWD/src/QmlControls

40 41 42 43 44 45 46 47
#
# OS Specific settings
#

MacBuild {
    QMAKE_INFO_PLIST    = Custom-Info.plist
    ICON                = $${BASEDIR}/resources/icons/macx.icns
    OTHER_FILES        += Custom-Info.plist
Gus Grubba's avatar
Gus Grubba committed
48
    LIBS               += -framework ApplicationServices
49 50 51 52 53 54 55 56
}

LinuxBuild {
    CONFIG  += qesp_linux_udev
}

WindowsBuild {
    RC_ICONS = resources/icons/qgroundcontrol.ico
57
    CONFIG += resources_big
58 59
}

60 61 62 63
#
# Branding
#

DonLakeFlyer's avatar
DonLakeFlyer committed
64
QGC_APP_NAME        = "QGroundControl"
65 66 67
QGC_ORG_NAME        = "QGroundControl.org"
QGC_ORG_DOMAIN      = "org.qgroundcontrol"
QGC_APP_DESCRIPTION = "Open source ground control app provided by QGroundControl dev team"
Gus Grubba's avatar
Gus Grubba committed
68
QGC_APP_COPYRIGHT   = "Copyright (C) 2019 QGroundControl Development Team. All rights reserved."
69

70 71 72 73
WindowsBuild {
    QGC_INSTALLER_ICON          = "WindowsQGC.ico"
    QGC_INSTALLER_HEADER_BITMAP = "installheader.bmp"
}
74

75 76 77 78 79 80
# 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)))
}

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
#
# Custom Build
#
# QGC will create a "CUSTOMCLASS" object (exposed by your custom build
# and derived from QGCCorePlugin).
# This is the start of allowing custom Plugins, which will eventually use a
# more defined runtime plugin architecture and not require a QGC project
# file you would have to keep in sync with the upstream repo.
#

# This allows you to ignore the custom build even if the custom build
# is present. It's useful to run "regular" builds to make sure you didn't
# break anything.

contains (CONFIG, QGC_DISABLE_CUSTOM_BUILD) {
    message("Disable custom build override")
} else {
    exists($$PWD/custom/custom.pri) {
        message("Found custom build")
        CONFIG  += CustomBuild
        DEFINES += QGC_CUSTOM_BUILD
        # custom.pri must define:
        # CUSTOMCLASS  = YourIQGCCorePluginDerivation
        # CUSTOMHEADER = \"\\\"YourIQGCCorePluginDerivation.h\\\"\"
        include($$PWD/custom/custom.pri)
    }
}

109 110 111 112 113 114 115 116
WindowsBuild {
    # Sets up application properties
    QMAKE_TARGET_COMPANY        = "$${QGC_ORG_NAME}"
    QMAKE_TARGET_DESCRIPTION    = "$${QGC_APP_DESCRIPTION}"
    QMAKE_TARGET_COPYRIGHT      = "$${QGC_APP_COPYRIGHT}"
    QMAKE_TARGET_PRODUCT        = "$${QGC_APP_NAME}"
}

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
#-------------------------------------------------------------------------------------
# iOS

iOSBuild {
    contains (CONFIG, DISABLE_BUILTIN_IOS) {
        message("Skipping builtin support for iOS")
    } else {
        LIBS                 += -framework AVFoundation
        #-- Info.plist (need an "official" one for the App Store)
        ForAppStore {
            message(App Store Build)
            #-- 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.")
            }
            QT               += qml-private
            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
        }
        QMAKE_ASSET_CATALOGS += ios/Images.xcassets
        BUNDLE.files          = ios/QGCLaunchScreen.xib $$QMAKE_INFO_PLIST
        QMAKE_BUNDLE_DATA    += BUNDLE
    }
}

Gus Grubba's avatar
Gus Grubba committed
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
#
# Plugin configuration
#
# This allows you to build custom versions of QGC which only includes your
# specific vehicle plugin. To remove support for a firmware type completely,
# disable both the Plugin and PluginFactory entries. To include custom support
# for an existing plugin type disable PluginFactory only. Then provide you own
# implementation of FirmwarePluginFactory and use the FirmwarePlugin and
# AutoPilotPlugin classes as the base clase for your derived plugin
# implementation.

contains (CONFIG, QGC_DISABLE_APM_PLUGIN) {
    message("Disable APM Plugin")
} else {
    CONFIG += APMFirmwarePlugin
}

contains (CONFIG, QGC_DISABLE_APM_PLUGIN_FACTORY) {
    message("Disable APM Plugin Factory")
} else {
    CONFIG += APMFirmwarePluginFactory
}

contains (CONFIG, QGC_DISABLE_PX4_PLUGIN) {
    message("Disable PX4 Plugin")
} else {
    CONFIG += PX4FirmwarePlugin
}

contains (CONFIG, QGC_DISABLE_PX4_PLUGIN_FACTORY) {
    message("Disable PX4 Plugin Factory")
} else {
    CONFIG += PX4FirmwarePluginFactory
}

dogmaphobic's avatar
dogmaphobic committed
182 183 184 185 186 187 188 189 190 191 192 193
# 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
}

Gus Grubba's avatar
Gus Grubba committed
194 195 196 197 198 199 200 201 202 203 204 205
# QTNFC
contains (DEFINES, QGC_DISABLE_QTNFC) {
    message("Skipping support for QTNFC (manual override from command line)")
    DEFINES -= QGC_ENABLE_QTNFC
} else:exists(user_config.pri):infile(user_config.pri, DEFINES, QGC_DISABLE_QTNFC) {
    message("Skipping support for QTNFC (manual override from user_config.pri)")
    DEFINES -= QGC_ENABLE_QTNFC
} else:exists(user_config.pri):infile(user_config.pri, DEFINES, QGC_ENABLE_QTNFC) {
    message("Including support for QTNFC (manual override from user_config.pri)")
    DEFINES += QGC_ENABLE_QTNFC
}

206 207 208
# USB Camera and UVC Video Sources
contains (DEFINES, QGC_DISABLE_UVC) {
    message("Skipping support for UVC devices (manual override from command line)")
209
    DEFINES += QGC_DISABLE_UVC
210 211
} else:exists(user_config.pri):infile(user_config.pri, DEFINES, QGC_DISABLE_UVC) {
    message("Skipping support for UVC devices (manual override from user_config.pri)")
212
    DEFINES += QGC_DISABLE_UVC
dogmaphobic's avatar
dogmaphobic committed
213 214 215 216 217
} else:LinuxBuild {
    contains(QT_VERSION, 5.5.1) {
        message("Skipping support for UVC devices (conflict with Qt 5.5.1 on Ubuntu)")
        DEFINES += QGC_DISABLE_UVC
    }
218 219
}

220 221 222 223 224 225 226
LinuxBuild {
    CONFIG += link_pkgconfig
}

# Qt configuration

CONFIG += qt \
227
    thread \
228 229 230 231 232 233 234
    c++11

DebugBuild {
    CONFIG -= qtquickcompiler
} else {
    CONFIG += qtquickcompiler
}
235 236 237 238 239 240

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 {
241
    CONFIG += silent
242
}
243 244 245 246 247

QT += \
    concurrent \
    gui \
    location \
248
    network \
249 250 251 252 253 254 255 256
    opengl \
    positioning \
    qml \
    quick \
    quickwidgets \
    sql \
    svg \
    widgets \
257 258
    xml \
    texttospeech
259 260 261 262 263 264

# Multimedia only used if QVC is enabled
!contains (DEFINES, QGC_DISABLE_UVC) {
    QT += \
        multimedia
}
265

266 267 268 269 270 271
AndroidBuild || iOSBuild {
    # Android and iOS don't unclude these
} else {
    QT += \
        printsupport \
        serialport \
272 273
}

dogmaphobic's avatar
dogmaphobic committed
274
contains(DEFINES, QGC_ENABLE_BLUETOOTH) {
dogmaphobic's avatar
dogmaphobic committed
275 276 277 278
QT += \
    bluetooth \
}

Gus Grubba's avatar
Gus Grubba committed
279 280 281 282 283
contains(DEFINES, QGC_ENABLE_QTNFC) {
QT += \
    nfc \
}

284 285
#  testlib is needed even in release flavor for QSignalSpy support
QT += testlib
286 287 288 289
ReleaseBuild {
    # We don't need the testlib console in release mode
    QT.testlib.CONFIG -= console
}
290

291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306
#
# Build-specific settings
#

DebugBuild {
!iOSBuild {
    CONFIG += console
}
}

#
# Our QtLocation "plugin"
#

include(src/QtLocationPlugin/QGCLocationPlugin.pri)

Don Gagne's avatar
Don Gagne committed
307 308 309
# Until pairing can be made to work cleanly on all OS it is turned off
DEFINES+=QGC_DISABLE_PAIRING

Gus Grubba's avatar
Gus Grubba committed
310 311 312 313 314
# Pairing
contains (DEFINES, QGC_DISABLE_PAIRING) {
    message("Skipping support for Pairing")
} else:exists(user_config.pri):infile(user_config.pri, DEFINES, QGC_DISABLE_PAIRING) {
    message("Skipping support for Pairing (manual override from user_config.pri)")
315 316 317
} else:AndroidBuild:contains(QT_ARCH, arm64) {
    # Haven't figured out how to get 64 bit arm OpenSLL yet which pairing requires
    message("Skipping support for Pairing (Missing Android OpenSSL 64 bit support)")
Gus Grubba's avatar
Gus Grubba committed
318 319 320 321 322
} else {
    message("Enabling support for Pairing")
    DEFINES += QGC_ENABLE_PAIRING
}

323 324 325 326 327 328
#
# External library configuration
#

include(QGCExternalLibs.pri)

329
#
330
# Resources (custom code can replace them)
331 332
#

333 334 335 336 337 338 339 340 341 342 343 344 345
CustomBuild {
    exists($$PWD/custom/qgroundcontrol.qrc) {
        message("Using custom qgroundcontrol.qrc")
        RESOURCES += $$PWD/custom/qgroundcontrol.qrc
    } else {
        RESOURCES += $$PWD/qgroundcontrol.qrc
    }
    exists($$PWD/custom/qgcresources.qrc) {
        message("Using custom qgcresources.qrc")
        RESOURCES += $$PWD/custom/qgcresources.qrc
    } else {
        RESOURCES += $$PWD/qgcresources.qrc
    }
346 347 348 349 350 351
    exists($$PWD/custom/qgcimages.qrc) {
        message("Using custom qgcimages.qrc")
        RESOURCES += $$PWD/custom/qgcimages.qrc
    } else {
        RESOURCES += $$PWD/qgcimages.qrc
    }
352
} else {
353 354 355
    DEFINES += QGC_APPLICATION_NAME=\"\\\"QGroundControl\\\"\"
    DEFINES += QGC_ORG_NAME=\"\\\"QGroundControl.org\\\"\"
    DEFINES += QGC_ORG_DOMAIN=\"\\\"org.qgroundcontrol\\\"\"
356 357
    RESOURCES += \
        $$PWD/qgroundcontrol.qrc \
358 359
        $$PWD/qgcresources.qrc \
        $$PWD/qgcimages.qrc
360 361
}

362 363 364 365 366 367 368 369 370
# On Qt 5.9 android versions there is the following bug: https://bugreports.qt.io/browse/QTBUG-61424
# This prevents FileDialog from being used. So we have a temp hack workaround for it which just no-ops
# the FileDialog fallback mechanism on android 5.9 builds.
equals(QT_MAJOR_VERSION, 5):equals(QT_MINOR_VERSION, 9):AndroidBuild {
    RESOURCES += $$PWD/HackAndroidFileDialog.qrc
} else {
    RESOURCES += $$PWD/HackFileDialog.qrc
}

371 372 373
#
# Main QGroundControl portion of project file
#
374

375 376
DebugBuild {
    # Unit Test resources
377
    RESOURCES += UnitTest.qrc
378 379
}

380 381 382 383 384 385 386 387 388
DEPENDPATH += \
    . \
    plugins

INCLUDEPATH += .

INCLUDEPATH += \
    include/ui \
    src \
389
    src/ADSB \
390
    src/api \
Don Gagne's avatar
Don Gagne committed
391
    src/AnalyzeView \
392
    src/Camera \
393 394 395
    src/AutoPilotPlugins \
    src/FlightDisplay \
    src/FlightMap \
396
    src/FlightMap/Widgets \
Jimmy Johnson's avatar
Jimmy Johnson committed
397
    src/FollowMe \
398
    src/Geo \
399
    src/GPS \
Gus Grubba's avatar
Gus Grubba committed
400
    src/Joystick \
401
    src/PlanView \
402
    src/MissionManager \
Gus Grubba's avatar
Gus Grubba committed
403
    src/PositionManager \
404
    src/QmlControls \
Gus Grubba's avatar
Gus Grubba committed
405 406
    src/QtLocationPlugin \
    src/QtLocationPlugin/QMLControl \
407
    src/Settings \
408
    src/Terrain \
409
    src/Vehicle \
Gus Grubba's avatar
Gus Grubba committed
410
    src/ViewWidgets \
411
    src/Audio \
Gus Grubba's avatar
Gus Grubba committed
412 413 414
    src/comm \
    src/input \
    src/lib/qmapcontrol \
415 416 417 418 419 420 421 422 423 424
    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 \

Gus Grubba's avatar
Gus Grubba committed
425 426 427 428 429
contains (DEFINES, QGC_ENABLE_PAIRING) {
    INCLUDEPATH += \
        src/PairingManager \
}

Gus Grubba's avatar
Gus Grubba committed
430 431 432 433 434
#
# Plugin API
#

HEADERS += \
435 436
    src/api/QGCCorePlugin.h \
    src/api/QGCOptions.h \
Gus Grubba's avatar
Gus Grubba committed
437
    src/api/QGCSettings.h \
438
    src/api/QmlComponentInfo.h \
439
    src/comm/MavlinkMessagesTimer.h \
Gus Grubba's avatar
Gus Grubba committed
440 441 442 443 444 445
    src/GPS/Drivers/src/base_station.h \

contains (DEFINES, QGC_ENABLE_PAIRING) {
    HEADERS += \
        src/PairingManager/aes.h
}
446 447 448 449

SOURCES += \
    src/api/QGCCorePlugin.cc \
    src/api/QGCOptions.cc \
Gus Grubba's avatar
Gus Grubba committed
450
    src/api/QGCSettings.cc \
451
    src/api/QmlComponentInfo.cc \
Gus Grubba's avatar
Gus Grubba committed
452 453 454 455 456 457
    src/comm/MavlinkMessagesTimer.cc \

contains (DEFINES, QGC_ENABLE_PAIRING) {
    SOURCES += \
        src/PairingManager/aes.cpp
}
Gus Grubba's avatar
Gus Grubba committed
458

459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493
#
# Unit Test specific configuration goes here (requires full debug build with all plugins)
#

DebugBuild { PX4FirmwarePlugin { PX4FirmwarePluginFactory { APMFirmwarePlugin { APMFirmwarePluginFactory { !MobileBuild {
    DEFINES += UNITTEST_BUILD

    INCLUDEPATH += \
        src/qgcunittest

    HEADERS += \
        src/Audio/AudioOutputTest.h \
        src/FactSystem/FactSystemTestBase.h \
        src/FactSystem/FactSystemTestGeneric.h \
        src/FactSystem/FactSystemTestPX4.h \
        src/FactSystem/ParameterManagerTest.h \
        src/MissionManager/CameraCalcTest.h \
        src/MissionManager/CameraSectionTest.h \
        src/MissionManager/CorridorScanComplexItemTest.h \
        src/MissionManager/FWLandingPatternTest.h \
        src/MissionManager/MissionCommandTreeTest.h \
        src/MissionManager/MissionControllerManagerTest.h \
        src/MissionManager/MissionControllerTest.h \
        src/MissionManager/MissionItemTest.h \
        src/MissionManager/MissionManagerTest.h \
        src/MissionManager/MissionSettingsTest.h \
        src/MissionManager/PlanMasterControllerTest.h \
        src/MissionManager/QGCMapPolygonTest.h \
        src/MissionManager/QGCMapPolylineTest.h \
        src/MissionManager/SectionTest.h \
        src/MissionManager/SimpleMissionItemTest.h \
        src/MissionManager/SpeedSectionTest.h \
        src/MissionManager/StructureScanComplexItemTest.h \
        src/MissionManager/SurveyComplexItemTest.h \
        src/MissionManager/TransectStyleComplexItemTest.h \
494
        src/MissionManager/TransectStyleComplexItemTestBase.h \
495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536
        src/MissionManager/VisualMissionItemTest.h \
        src/qgcunittest/GeoTest.h \
        src/qgcunittest/LinkManagerTest.h \
        src/qgcunittest/MavlinkLogTest.h \
        src/qgcunittest/MultiSignalSpy.h \
        src/qgcunittest/TCPLinkTest.h \
        src/qgcunittest/TCPLoopBackServer.h \
        src/qgcunittest/UnitTest.h \
        src/Vehicle/SendMavCommandTest.h \
        #src/qgcunittest/RadioConfigTest.h \
        #src/AnalyzeView/LogDownloadTest.h \
        #src/qgcunittest/FileDialogTest.h \
        #src/qgcunittest/FileManagerTest.h \
        #src/qgcunittest/FlightGearTest.h \
        #src/qgcunittest/MainWindowTest.h \
        #src/qgcunittest/MessageBoxTest.h \

    SOURCES += \
        src/Audio/AudioOutputTest.cc \
        src/FactSystem/FactSystemTestBase.cc \
        src/FactSystem/FactSystemTestGeneric.cc \
        src/FactSystem/FactSystemTestPX4.cc \
        src/FactSystem/ParameterManagerTest.cc \
        src/MissionManager/CameraCalcTest.cc \
        src/MissionManager/CameraSectionTest.cc \
        src/MissionManager/CorridorScanComplexItemTest.cc \
        src/MissionManager/FWLandingPatternTest.cc \
        src/MissionManager/MissionCommandTreeTest.cc \
        src/MissionManager/MissionControllerManagerTest.cc \
        src/MissionManager/MissionControllerTest.cc \
        src/MissionManager/MissionItemTest.cc \
        src/MissionManager/MissionManagerTest.cc \
        src/MissionManager/MissionSettingsTest.cc \
        src/MissionManager/PlanMasterControllerTest.cc \
        src/MissionManager/QGCMapPolygonTest.cc \
        src/MissionManager/QGCMapPolylineTest.cc \
        src/MissionManager/SectionTest.cc \
        src/MissionManager/SimpleMissionItemTest.cc \
        src/MissionManager/SpeedSectionTest.cc \
        src/MissionManager/StructureScanComplexItemTest.cc \
        src/MissionManager/SurveyComplexItemTest.cc \
        src/MissionManager/TransectStyleComplexItemTest.cc \
537
        src/MissionManager/TransectStyleComplexItemTestBase.cc \
538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557
        src/MissionManager/VisualMissionItemTest.cc \
        src/qgcunittest/GeoTest.cc \
        src/qgcunittest/LinkManagerTest.cc \
        src/qgcunittest/MavlinkLogTest.cc \
        src/qgcunittest/MultiSignalSpy.cc \
        src/qgcunittest/TCPLinkTest.cc \
        src/qgcunittest/TCPLoopBackServer.cc \
        src/qgcunittest/UnitTest.cc \
        src/qgcunittest/UnitTestList.cc \
        src/Vehicle/SendMavCommandTest.cc \
        #src/qgcunittest/RadioConfigTest.cc \
        #src/AnalyzeView/LogDownloadTest.cc \
        #src/qgcunittest/FileDialogTest.cc \
        #src/qgcunittest/FileManagerTest.cc \
        #src/qgcunittest/FlightGearTest.cc \
        #src/qgcunittest/MainWindowTest.cc \
        #src/qgcunittest/MessageBoxTest.cc \

} } } } } }

558 559
# Main QGC Headers and Source files

560
HEADERS += \
561 562
    src/ADSB/ADSBVehicle.h \
    src/ADSB/ADSBVehicleManager.h \
563
    src/AnalyzeView/LogDownloadController.h \
564
    src/AnalyzeView/PX4LogParser.h \
565
    src/AnalyzeView/ULogParser.h \
566
    src/AnalyzeView/MavlinkConsoleController.h \
567
    src/Audio/AudioOutput.h \
568 569 570
    src/Camera/QGCCameraControl.h \
    src/Camera/QGCCameraIO.h \
    src/Camera/QGCCameraManager.h \
571
    src/CmdLineOptParser.h \
572
    src/FirmwarePlugin/PX4/px4_custom_mode.h \
573
    src/FlightMap/Widgets/ValuesWidgetController.h \
Gus Grubba's avatar
Gus Grubba committed
574
    src/FollowMe/FollowMe.h \
575 576
    src/Joystick/Joystick.h \
    src/Joystick/JoystickManager.h \
Don Gagne's avatar
Don Gagne committed
577
    src/JsonHelper.h \
578
    src/KMLFileHelper.h \
579
    src/LogCompressor.h \
580
    src/MissionManager/CameraCalc.h \
581
    src/MissionManager/CameraSection.h \
582
    src/MissionManager/CameraSpec.h \
583
    src/MissionManager/ComplexMissionItem.h \
584
    src/MissionManager/CorridorScanComplexItem.h \
DonLakeFlyer's avatar
DonLakeFlyer committed
585
    src/MissionManager/CorridorScanPlanCreator.h \
586
    src/MissionManager/BlankPlanCreator.h \
587
    src/MissionManager/FixedWingLandingComplexItem.h \
588 589
    src/MissionManager/GeoFenceController.h \
    src/MissionManager/GeoFenceManager.h \
590
    src/MissionManager/KML.h \
591
    src/MissionManager/MissionCommandList.h \
592 593
    src/MissionManager/MissionCommandTree.h \
    src/MissionManager/MissionCommandUIInfo.h \
594
    src/MissionManager/MissionController.h \
595 596
    src/MissionManager/MissionItem.h \
    src/MissionManager/MissionManager.h \
597
    src/MissionManager/MissionSettingsItem.h \
598
    src/MissionManager/PlanElementController.h \
DonLakeFlyer's avatar
DonLakeFlyer committed
599
    src/MissionManager/PlanCreator.h \
600
    src/MissionManager/PlanManager.h \
601
    src/MissionManager/PlanMasterController.h \
602 603 604
    src/MissionManager/QGCFenceCircle.h \
    src/MissionManager/QGCFencePolygon.h \
    src/MissionManager/QGCMapCircle.h \
605
    src/MissionManager/QGCMapPolygon.h \
606
    src/MissionManager/QGCMapPolyline.h \
607 608 609
    src/MissionManager/RallyPoint.h \
    src/MissionManager/RallyPointController.h \
    src/MissionManager/RallyPointManager.h \
610
    src/MissionManager/SimpleMissionItem.h \
611 612
    src/MissionManager/Section.h \
    src/MissionManager/SpeedSection.h \
613
    src/MissionManager/StructureScanComplexItem.h \
DonLakeFlyer's avatar
DonLakeFlyer committed
614
    src/MissionManager/StructureScanPlanCreator.h \
615
    src/MissionManager/SurveyComplexItem.h \
DonLakeFlyer's avatar
DonLakeFlyer committed
616
    src/MissionManager/SurveyPlanCreator.h \
617
    src/MissionManager/TakeoffMissionItem.h \
618
    src/MissionManager/TransectStyleComplexItem.h \
619
    src/MissionManager/VisualMissionItem.h \
Gus Grubba's avatar
Gus Grubba committed
620 621
    src/PositionManager/PositionManager.h \
    src/PositionManager/SimulatedPosition.h \
622 623 624 625 626 627 628 629
    src/Geo/QGCGeo.h \
    src/Geo/Constants.hpp \
    src/Geo/Math.hpp \
    src/Geo/Utility.hpp \
    src/Geo/UTMUPS.hpp \
    src/Geo/MGRS.hpp \
    src/Geo/TransverseMercator.hpp \
    src/Geo/PolarStereographic.hpp \
630 631 632 633
    src/QGC.h \
    src/QGCApplication.h \
    src/QGCComboBox.h \
    src/QGCConfig.h \
634
    src/QGCFileDownload.h \
635
    src/QGCLoggingCategory.h \
Don Gagne's avatar
Don Gagne committed
636
    src/QGCMapPalette.h \
637
    src/QGCPalette.h \
638
    src/QGCQGeoCoordinate.h \
639 640
    src/QGCTemporaryFile.h \
    src/QGCToolbox.h \
641
    src/QmlControls/AppMessages.h \
642
    src/QmlControls/CoordinateVector.h \
643
    src/QmlControls/EditPositionDialogController.h \
644
    src/QmlControls/ParameterEditorController.h \
645
    src/QmlControls/QGCFileDialogController.h \
Gus Grubba's avatar
Gus Grubba committed
646
    src/QmlControls/QGCImageProvider.h \
647 648
    src/QmlControls/QGroundControlQmlGlobal.h \
    src/QmlControls/QmlObjectListModel.h \
649
    src/QmlControls/QGCGeoBoundingCube.h \
Gus Grubba's avatar
Gus Grubba committed
650 651 652
    src/QmlControls/RCChannelMonitorController.h \
    src/QmlControls/ScreenToolsController.h \
    src/QtLocationPlugin/QMLControl/QGCMapEngineManager.h \
653
    src/Settings/ADSBVehicleManagerSettings.h \
654 655
    src/Settings/AppSettings.h \
    src/Settings/AutoConnectSettings.h \
656
    src/Settings/BrandImageSettings.h \
657
    src/Settings/FirmwareUpgradeSettings.h \
658
    src/Settings/FlightMapSettings.h \
659
    src/Settings/FlyViewSettings.h \
660
    src/Settings/OfflineMapsSettings.h \
661
    src/Settings/PlanViewSettings.h \
Don Gagne's avatar
Don Gagne committed
662
    src/Settings/RTKSettings.h \
663 664 665 666
    src/Settings/SettingsGroup.h \
    src/Settings/SettingsManager.h \
    src/Settings/UnitsSettings.h \
    src/Settings/VideoSettings.h \
667 668
    src/ShapeFileHelper.h \
    src/SHPFileHelper.h \
669
    src/Terrain/TerrainQuery.h \
Andreas Bircher's avatar
Andreas Bircher committed
670
    src/TerrainTile.h \
671
    src/Vehicle/GPSRTKFactGroup.h \
Gus Grubba's avatar
Gus Grubba committed
672
    src/Vehicle/MAVLinkLogManager.h \
673
    src/Vehicle/MultiVehicleManager.h \
674 675
    src/Vehicle/TerrainFactGroup.h \
    src/Vehicle/TerrainProtocolHandler.h \
676 677 678
    src/Vehicle/TrajectoryPoints.h \
    src/Vehicle/Vehicle.h \
    src/Vehicle/VehicleObjectAvoidance.h \
Gus Grubba's avatar
Gus Grubba committed
679 680 681 682
    src/VehicleSetup/JoystickConfigController.h \
    src/comm/LinkConfiguration.h \
    src/comm/LinkInterface.h \
    src/comm/LinkManager.h \
683
    src/comm/LogReplayLink.h \
Gus Grubba's avatar
Gus Grubba committed
684 685 686 687
    src/comm/MAVLinkProtocol.h \
    src/comm/QGCMAVLink.h \
    src/comm/TCPLink.h \
    src/comm/UDPLink.h \
Willian Galvani's avatar
Willian Galvani committed
688
    src/comm/UdpIODevice.h \
689 690 691
    src/uas/UAS.h \
    src/uas/UASInterface.h \
    src/uas/UASMessageHandler.h \
692 693
    src/AnalyzeView/GeoTagController.h \
    src/AnalyzeView/ExifParser.h \
Gus Grubba's avatar
Gus Grubba committed
694
    src/uas/FileManager.h \
695

Gus Grubba's avatar
Gus Grubba committed
696 697 698 699
contains (DEFINES, QGC_ENABLE_PAIRING) {
    HEADERS += \
        src/PairingManager/PairingManager.h \
}
700

701 702
AndroidBuild {
HEADERS += \
703
    src/Joystick/JoystickAndroid.h \
704 705
}

706 707 708 709 710 711 712
DebugBuild {
HEADERS += \
    src/comm/MockLink.h \
    src/comm/MockLinkFileServer.h \
    src/comm/MockLinkMissionItemHandler.h \
}

713 714 715
WindowsBuild {
    PRECOMPILED_HEADER += src/stable_headers.h
    HEADERS += src/stable_headers.h
Daniel Agar's avatar
Daniel Agar committed
716
    CONFIG -= silent
717
    OTHER_FILES += .appveyor.yml
718 719
}

dogmaphobic's avatar
dogmaphobic committed
720
contains(DEFINES, QGC_ENABLE_BLUETOOTH) {
dogmaphobic's avatar
dogmaphobic committed
721 722
    HEADERS += \
    src/comm/BluetoothLink.h \
dogmaphobic's avatar
dogmaphobic committed
723
}
724

Gus Grubba's avatar
Gus Grubba committed
725 726 727 728 729 730 731
contains (DEFINES, QGC_ENABLE_PAIRING) {
    contains(DEFINES, QGC_ENABLE_QTNFC) {
        HEADERS += \
            src/PairingManager/QtNFC.h
    }
}

Gus Grubba's avatar
Gus Grubba committed
732
!NoSerialBuild {
733
HEADERS += \
734
    src/comm/QGCSerialPortInfo.h \
735 736 737 738 739
    src/comm/SerialLink.h \
}

!MobileBuild {
HEADERS += \
Gus Grubba's avatar
Gus Grubba committed
740
    src/GPS/Drivers/src/gps_helper.h \
741 742
    src/GPS/Drivers/src/rtcm.h \
    src/GPS/Drivers/src/ashtech.h \
Gus Grubba's avatar
Gus Grubba committed
743
    src/GPS/Drivers/src/ubx.h \
744
    src/GPS/Drivers/src/sbf.h \
Gus Grubba's avatar
Gus Grubba committed
745 746 747 748 749 750 751 752
    src/GPS/GPSManager.h \
    src/GPS/GPSPositionMessage.h \
    src/GPS/GPSProvider.h \
    src/GPS/RTCM/RTCMMavlink.h \
    src/GPS/definitions.h \
    src/GPS/satellite_info.h \
    src/GPS/vehicle_gps_position.h \
    src/Joystick/JoystickSDL.h \
753
    src/RunGuard.h \
754 755 756 757 758
    src/comm/QGCHilLink.h \
    src/comm/QGCJSBSimLink.h \
    src/comm/QGCXPlaneLink.h \
}

Don Gagne's avatar
Don Gagne committed
759 760 761 762
iOSBuild {
    OBJECTIVE_SOURCES += \
        src/MobileScreenMgr.mm \
}
763

Don Gagne's avatar
Don Gagne committed
764
AndroidBuild {
Don Gagne's avatar
Don Gagne committed
765
    SOURCES += src/MobileScreenMgr.cc \
766
    src/Joystick/JoystickAndroid.cc \
Don Gagne's avatar
Don Gagne committed
767 768
}

769
SOURCES += \
770 771
    src/ADSB/ADSBVehicle.cc \
    src/ADSB/ADSBVehicleManager.cc \
772
    src/AnalyzeView/LogDownloadController.cc \
773
    src/AnalyzeView/PX4LogParser.cc \
774
    src/AnalyzeView/ULogParser.cc \
775
    src/AnalyzeView/MavlinkConsoleController.cc \
776
    src/Audio/AudioOutput.cc \
777 778 779
    src/Camera/QGCCameraControl.cc \
    src/Camera/QGCCameraIO.cc \
    src/Camera/QGCCameraManager.cc \
780
    src/CmdLineOptParser.cc \
781
    src/FlightMap/Widgets/ValuesWidgetController.cc \
Gus Grubba's avatar
Gus Grubba committed
782
    src/FollowMe/FollowMe.cc \
783 784
    src/Joystick/Joystick.cc \
    src/Joystick/JoystickManager.cc \
Don Gagne's avatar
Don Gagne committed
785
    src/JsonHelper.cc \
786
    src/KMLFileHelper.cc \
787
    src/LogCompressor.cc \
788
    src/MissionManager/CameraCalc.cc \
789
    src/MissionManager/CameraSection.cc \
790
    src/MissionManager/CameraSpec.cc \
791
    src/MissionManager/ComplexMissionItem.cc \
792
    src/MissionManager/CorridorScanComplexItem.cc \
DonLakeFlyer's avatar
DonLakeFlyer committed
793
    src/MissionManager/CorridorScanPlanCreator.cc \
794
    src/MissionManager/BlankPlanCreator.cc \
795
    src/MissionManager/FixedWingLandingComplexItem.cc \
796 797
    src/MissionManager/GeoFenceController.cc \
    src/MissionManager/GeoFenceManager.cc \
798
    src/MissionManager/KML.cc \
799
    src/MissionManager/MissionCommandList.cc \
800 801
    src/MissionManager/MissionCommandTree.cc \
    src/MissionManager/MissionCommandUIInfo.cc \
802
    src/MissionManager/MissionController.cc \
803 804
    src/MissionManager/MissionItem.cc \
    src/MissionManager/MissionManager.cc \
805
    src/MissionManager/MissionSettingsItem.cc \
806
    src/MissionManager/PlanElementController.cc \
DonLakeFlyer's avatar
DonLakeFlyer committed
807
    src/MissionManager/PlanCreator.cc \
808
    src/MissionManager/PlanManager.cc \
809
    src/MissionManager/PlanMasterController.cc \
810 811 812
    src/MissionManager/QGCFenceCircle.cc \
    src/MissionManager/QGCFencePolygon.cc \
    src/MissionManager/QGCMapCircle.cc \
813
    src/MissionManager/QGCMapPolygon.cc \
814
    src/MissionManager/QGCMapPolyline.cc \
815 816 817
    src/MissionManager/RallyPoint.cc \
    src/MissionManager/RallyPointController.cc \
    src/MissionManager/RallyPointManager.cc \
818
    src/MissionManager/SimpleMissionItem.cc \
819
    src/MissionManager/SpeedSection.cc \
820
    src/MissionManager/StructureScanComplexItem.cc \
DonLakeFlyer's avatar
DonLakeFlyer committed
821
    src/MissionManager/StructureScanPlanCreator.cc \
822
    src/MissionManager/SurveyComplexItem.cc \
DonLakeFlyer's avatar
DonLakeFlyer committed
823
    src/MissionManager/SurveyPlanCreator.cc \
824
    src/MissionManager/TakeoffMissionItem.cc \
825
    src/MissionManager/TransectStyleComplexItem.cc \
826
    src/MissionManager/VisualMissionItem.cc \
Gus Grubba's avatar
Gus Grubba committed
827 828
    src/PositionManager/PositionManager.cpp \
    src/PositionManager/SimulatedPosition.cc \
829 830 831 832 833 834 835
    src/Geo/QGCGeo.cc \
    src/Geo/Math.cpp \
    src/Geo/Utility.cpp \
    src/Geo/UTMUPS.cpp \
    src/Geo/MGRS.cpp \
    src/Geo/TransverseMercator.cpp \
    src/Geo/PolarStereographic.cpp \
836 837 838
    src/QGC.cc \
    src/QGCApplication.cc \
    src/QGCComboBox.cc \
839
    src/QGCFileDownload.cc \
840
    src/QGCLoggingCategory.cc \
Don Gagne's avatar
Don Gagne committed
841
    src/QGCMapPalette.cc \
842
    src/QGCPalette.cc \
843
    src/QGCQGeoCoordinate.cc \
844 845
    src/QGCTemporaryFile.cc \
    src/QGCToolbox.cc \
846
    src/QmlControls/AppMessages.cc \
847
    src/QmlControls/CoordinateVector.cc \
848
    src/QmlControls/EditPositionDialogController.cc \
849
    src/QmlControls/ParameterEditorController.cc \
850
    src/QmlControls/QGCFileDialogController.cc \
Gus Grubba's avatar
Gus Grubba committed
851
    src/QmlControls/QGCImageProvider.cc \
852 853
    src/QmlControls/QGroundControlQmlGlobal.cc \
    src/QmlControls/QmlObjectListModel.cc \
854
    src/QmlControls/QGCGeoBoundingCube.cc \
Gus Grubba's avatar
Gus Grubba committed
855 856 857
    src/QmlControls/RCChannelMonitorController.cc \
    src/QmlControls/ScreenToolsController.cc \
    src/QtLocationPlugin/QMLControl/QGCMapEngineManager.cc \
858
    src/Settings/ADSBVehicleManagerSettings.cc \
859 860
    src/Settings/AppSettings.cc \
    src/Settings/AutoConnectSettings.cc \
861
    src/Settings/BrandImageSettings.cc \
862
    src/Settings/FirmwareUpgradeSettings.cc \
863
    src/Settings/FlightMapSettings.cc \
864
    src/Settings/FlyViewSettings.cc \
865
    src/Settings/OfflineMapsSettings.cc \
866
    src/Settings/PlanViewSettings.cc \
Don Gagne's avatar
Don Gagne committed
867
    src/Settings/RTKSettings.cc \
868 869 870 871
    src/Settings/SettingsGroup.cc \
    src/Settings/SettingsManager.cc \
    src/Settings/UnitsSettings.cc \
    src/Settings/VideoSettings.cc \
872 873
    src/ShapeFileHelper.cc \
    src/SHPFileHelper.cc \
874
    src/Terrain/TerrainQuery.cc \
Andreas Bircher's avatar
Andreas Bircher committed
875
    src/TerrainTile.cc\
876
    src/Vehicle/GPSRTKFactGroup.cc \
Gus Grubba's avatar
Gus Grubba committed
877
    src/Vehicle/MAVLinkLogManager.cc \
878
    src/Vehicle/MultiVehicleManager.cc \
879 880
    src/Vehicle/TerrainFactGroup.cc \
    src/Vehicle/TerrainProtocolHandler.cc \
881 882 883
    src/Vehicle/TrajectoryPoints.cc \
    src/Vehicle/Vehicle.cc \
    src/Vehicle/VehicleObjectAvoidance.cc \
Gus Grubba's avatar
Gus Grubba committed
884 885
    src/VehicleSetup/JoystickConfigController.cc \
    src/comm/LinkConfiguration.cc \
886
    src/comm/LinkInterface.cc \
Gus Grubba's avatar
Gus Grubba committed
887
    src/comm/LinkManager.cc \
888
    src/comm/LogReplayLink.cc \
Gus Grubba's avatar
Gus Grubba committed
889 890 891 892
    src/comm/MAVLinkProtocol.cc \
    src/comm/QGCMAVLink.cc \
    src/comm/TCPLink.cc \
    src/comm/UDPLink.cc \
Willian Galvani's avatar
Willian Galvani committed
893
    src/comm/UdpIODevice.cc \
Gus Grubba's avatar
Gus Grubba committed
894
    src/main.cc \
895 896
    src/uas/UAS.cc \
    src/uas/UASMessageHandler.cc \
897 898
    src/AnalyzeView/GeoTagController.cc \
    src/AnalyzeView/ExifParser.cc \
Gus Grubba's avatar
Gus Grubba committed
899 900 901 902 903 904
    src/uas/FileManager.cc \

contains (DEFINES, QGC_ENABLE_PAIRING) {
    SOURCES += \
        src/PairingManager/PairingManager.cc \
}
905

906 907 908 909 910 911 912
DebugBuild {
SOURCES += \
    src/comm/MockLink.cc \
    src/comm/MockLinkFileServer.cc \
    src/comm/MockLinkMissionItemHandler.cc \
}

Gus Grubba's avatar
Gus Grubba committed
913
!NoSerialBuild {
914
SOURCES += \
915
    src/comm/QGCSerialPortInfo.cc \
916 917 918
    src/comm/SerialLink.cc \
}

dogmaphobic's avatar
dogmaphobic committed
919
contains(DEFINES, QGC_ENABLE_BLUETOOTH) {
dogmaphobic's avatar
dogmaphobic committed
920 921 922 923
    SOURCES += \
    src/comm/BluetoothLink.cc \
}

Gus Grubba's avatar
Gus Grubba committed
924 925 926 927 928 929 930
contains (DEFINES, QGC_ENABLE_PAIRING) {
    contains(DEFINES, QGC_ENABLE_QTNFC) {
        SOURCES += \
        src/PairingManager/QtNFC.cc
    }
}

931 932
!MobileBuild {
SOURCES += \
Gus Grubba's avatar
Gus Grubba committed
933
    src/GPS/Drivers/src/gps_helper.cpp \
934 935
    src/GPS/Drivers/src/rtcm.cpp \
    src/GPS/Drivers/src/ashtech.cpp \
Gus Grubba's avatar
Gus Grubba committed
936
    src/GPS/Drivers/src/ubx.cpp \
937
    src/GPS/Drivers/src/sbf.cpp \
Gus Grubba's avatar
Gus Grubba committed
938 939 940 941
    src/GPS/GPSManager.cc \
    src/GPS/GPSProvider.cc \
    src/GPS/RTCM/RTCMMavlink.cc \
    src/Joystick/JoystickSDL.cc \
942
    src/RunGuard.cc \
943 944
    src/comm/QGCJSBSimLink.cc \
    src/comm/QGCXPlaneLink.cc \
945
}
946 947 948 949 950 951

#
# Firmware Plugin Support
#

INCLUDEPATH += \
Don Gagne's avatar
Don Gagne committed
952
    src/AutoPilotPlugins/Common \
953 954 955 956 957
    src/FirmwarePlugin \
    src/VehicleSetup \

HEADERS+= \
    src/AutoPilotPlugins/AutoPilotPlugin.h \
Gus Grubba's avatar
Gus Grubba committed
958 959
    src/AutoPilotPlugins/Common/ESP8266Component.h \
    src/AutoPilotPlugins/Common/ESP8266ComponentController.h \
Don Gagne's avatar
Don Gagne committed
960
    src/AutoPilotPlugins/Common/MotorComponent.h \
Don Gagne's avatar
Don Gagne committed
961
    src/AutoPilotPlugins/Common/RadioComponentController.h \
962 963
    src/AutoPilotPlugins/Common/SyslinkComponent.h \
    src/AutoPilotPlugins/Common/SyslinkComponentController.h \
964
    src/AutoPilotPlugins/Generic/GenericAutoPilotPlugin.h \
965
    src/FirmwarePlugin/CameraMetaData.h \
966
    src/FirmwarePlugin/FirmwarePlugin.h \
Gus Grubba's avatar
Gus Grubba committed
967
    src/FirmwarePlugin/FirmwarePluginManager.h \
968 969
    src/VehicleSetup/VehicleComponent.h \

970
!MobileBuild { !NoSerialBuild {
Gus Grubba's avatar
Gus Grubba committed
971 972 973 974 975
    HEADERS += \
        src/VehicleSetup/Bootloader.h \
        src/VehicleSetup/FirmwareImage.h \
        src/VehicleSetup/FirmwareUpgradeController.h \
        src/VehicleSetup/PX4FirmwareUpgradeThread.h \
976
}}
977 978 979

SOURCES += \
    src/AutoPilotPlugins/AutoPilotPlugin.cc \
Gus Grubba's avatar
Gus Grubba committed
980 981
    src/AutoPilotPlugins/Common/ESP8266Component.cc \
    src/AutoPilotPlugins/Common/ESP8266ComponentController.cc \
Don Gagne's avatar
Don Gagne committed
982
    src/AutoPilotPlugins/Common/MotorComponent.cc \
Don Gagne's avatar
Don Gagne committed
983
    src/AutoPilotPlugins/Common/RadioComponentController.cc \
984 985
    src/AutoPilotPlugins/Common/SyslinkComponent.cc \
    src/AutoPilotPlugins/Common/SyslinkComponentController.cc \
986
    src/AutoPilotPlugins/Generic/GenericAutoPilotPlugin.cc \
987
    src/FirmwarePlugin/CameraMetaData.cc \
988
    src/FirmwarePlugin/FirmwarePlugin.cc \
989 990 991
    src/FirmwarePlugin/FirmwarePluginManager.cc \
    src/VehicleSetup/VehicleComponent.cc \

992
!MobileBuild { !NoSerialBuild {
993
    SOURCES += \
Gus Grubba's avatar
Gus Grubba committed
994 995 996 997
        src/VehicleSetup/Bootloader.cc \
        src/VehicleSetup/FirmwareImage.cc \
        src/VehicleSetup/FirmwareUpgradeController.cc \
        src/VehicleSetup/PX4FirmwareUpgradeThread.cc \
998
}}
999

1000
# ArduPilot Specific
1001

1002 1003
ArdupilotEnabled {
    HEADERS += \
1004 1005 1006 1007 1008 1009
        src/Settings/APMMavlinkStreamRateSettings.h \

    SOURCES += \
        src/Settings/APMMavlinkStreamRateSettings.cc \
}

1010 1011
# ArduPilot FirmwarePlugin

1012
APMFirmwarePlugin {
1013
    RESOURCES *= src/FirmwarePlugin/APM/APMResources.qrc
Gus Grubba's avatar
Gus Grubba committed
1014

1015 1016 1017 1018 1019 1020
    INCLUDEPATH += \
        src/AutoPilotPlugins/APM \
        src/FirmwarePlugin/APM \

    HEADERS += \
        src/AutoPilotPlugins/APM/APMAirframeComponent.h \
Gus Grubba's avatar
Gus Grubba committed
1021 1022
        src/AutoPilotPlugins/APM/APMAirframeComponentController.h \
        src/AutoPilotPlugins/APM/APMAutoPilotPlugin.h \
1023 1024 1025 1026
        src/AutoPilotPlugins/APM/APMCameraComponent.h \
        src/AutoPilotPlugins/APM/APMCompassCal.h \
        src/AutoPilotPlugins/APM/APMFlightModesComponent.h \
        src/AutoPilotPlugins/APM/APMFlightModesComponentController.h \
DonLakeFlyer's avatar
DonLakeFlyer committed
1027 1028
        src/AutoPilotPlugins/APM/APMFollowComponent.h \
        src/AutoPilotPlugins/APM/APMFollowComponentController.h \
DonLakeFlyer's avatar
DonLakeFlyer committed
1029
        src/AutoPilotPlugins/APM/APMHeliComponent.h \
Gus Grubba's avatar
Gus Grubba committed
1030
        src/AutoPilotPlugins/APM/APMLightsComponent.h \
1031
        src/AutoPilotPlugins/APM/APMSubFrameComponent.h \
1032
        src/AutoPilotPlugins/APM/APMMotorComponent.h \
1033 1034 1035 1036 1037
        src/AutoPilotPlugins/APM/APMPowerComponent.h \
        src/AutoPilotPlugins/APM/APMRadioComponent.h \
        src/AutoPilotPlugins/APM/APMSafetyComponent.h \
        src/AutoPilotPlugins/APM/APMSensorsComponent.h \
        src/AutoPilotPlugins/APM/APMSensorsComponentController.h \
1038
        src/AutoPilotPlugins/APM/APMSubMotorComponentController.h \
1039
        src/AutoPilotPlugins/APM/APMTuningComponent.h \
Gus Grubba's avatar
Gus Grubba committed
1040 1041 1042 1043 1044 1045
        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 \
        src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.h \
1046 1047 1048 1049

    SOURCES += \
        src/AutoPilotPlugins/APM/APMAirframeComponent.cc \
        src/AutoPilotPlugins/APM/APMAirframeComponentController.cc \
Gus Grubba's avatar
Gus Grubba committed
1050
        src/AutoPilotPlugins/APM/APMAutoPilotPlugin.cc \
1051 1052 1053 1054
        src/AutoPilotPlugins/APM/APMCameraComponent.cc \
        src/AutoPilotPlugins/APM/APMCompassCal.cc \
        src/AutoPilotPlugins/APM/APMFlightModesComponent.cc \
        src/AutoPilotPlugins/APM/APMFlightModesComponentController.cc \
DonLakeFlyer's avatar
DonLakeFlyer committed
1055 1056
        src/AutoPilotPlugins/APM/APMFollowComponent.cc \
        src/AutoPilotPlugins/APM/APMFollowComponentController.cc \
DonLakeFlyer's avatar
DonLakeFlyer committed
1057
        src/AutoPilotPlugins/APM/APMHeliComponent.cc \
Gus Grubba's avatar
Gus Grubba committed
1058
        src/AutoPilotPlugins/APM/APMLightsComponent.cc \
1059
        src/AutoPilotPlugins/APM/APMSubFrameComponent.cc \
1060
        src/AutoPilotPlugins/APM/APMMotorComponent.cc \
1061 1062 1063 1064 1065
        src/AutoPilotPlugins/APM/APMPowerComponent.cc \
        src/AutoPilotPlugins/APM/APMRadioComponent.cc \
        src/AutoPilotPlugins/APM/APMSafetyComponent.cc \
        src/AutoPilotPlugins/APM/APMSensorsComponent.cc \
        src/AutoPilotPlugins/APM/APMSensorsComponentController.cc \
1066
        src/AutoPilotPlugins/APM/APMSubMotorComponentController.cc \
1067
        src/AutoPilotPlugins/APM/APMTuningComponent.cc \
Gus Grubba's avatar
Gus Grubba committed
1068 1069 1070 1071 1072 1073
        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 \
        src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.cc \
1074 1075 1076
}

APMFirmwarePluginFactory {
Gus Grubba's avatar
Gus Grubba committed
1077 1078
    HEADERS   += src/FirmwarePlugin/APM/APMFirmwarePluginFactory.h
    SOURCES   += src/FirmwarePlugin/APM/APMFirmwarePluginFactory.cc
1079 1080 1081 1082 1083
}

# PX4 FirmwarePlugin

PX4FirmwarePlugin {
1084
    RESOURCES *= src/FirmwarePlugin/PX4/PX4Resources.qrc
Gus Grubba's avatar
Gus Grubba committed
1085

1086 1087 1088 1089 1090 1091 1092 1093
    INCLUDEPATH += \
        src/AutoPilotPlugins/PX4 \
        src/FirmwarePlugin/PX4 \

    HEADERS+= \
        src/AutoPilotPlugins/PX4/AirframeComponent.h \
        src/AutoPilotPlugins/PX4/AirframeComponentAirframes.h \
        src/AutoPilotPlugins/PX4/AirframeComponentController.h \
Gus Grubba's avatar
Gus Grubba committed
1094
        src/AutoPilotPlugins/PX4/CameraComponent.h \
1095 1096
        src/AutoPilotPlugins/PX4/FlightModesComponent.h \
        src/AutoPilotPlugins/PX4/PX4AdvancedFlightModesController.h \
Gus Grubba's avatar
Gus Grubba committed
1097 1098 1099
        src/AutoPilotPlugins/PX4/PX4AirframeLoader.h \
        src/AutoPilotPlugins/PX4/PX4AutoPilotPlugin.h \
        src/AutoPilotPlugins/PX4/PX4RadioComponent.h \
1100
        src/AutoPilotPlugins/PX4/PX4SimpleFlightModesController.h \
Gus Grubba's avatar
Gus Grubba committed
1101
        src/AutoPilotPlugins/PX4/PX4TuningComponent.h \
1102 1103 1104 1105 1106
        src/AutoPilotPlugins/PX4/PowerComponent.h \
        src/AutoPilotPlugins/PX4/PowerComponentController.h \
        src/AutoPilotPlugins/PX4/SafetyComponent.h \
        src/AutoPilotPlugins/PX4/SensorsComponent.h \
        src/AutoPilotPlugins/PX4/SensorsComponentController.h \
Gus Grubba's avatar
Gus Grubba committed
1107 1108
        src/FirmwarePlugin/PX4/PX4FirmwarePlugin.h \
        src/FirmwarePlugin/PX4/PX4ParameterMetaData.h \
1109 1110 1111 1112 1113

    SOURCES += \
        src/AutoPilotPlugins/PX4/AirframeComponent.cc \
        src/AutoPilotPlugins/PX4/AirframeComponentAirframes.cc \
        src/AutoPilotPlugins/PX4/AirframeComponentController.cc \
Gus Grubba's avatar
Gus Grubba committed
1114
        src/AutoPilotPlugins/PX4/CameraComponent.cc \
1115 1116 1117
        src/AutoPilotPlugins/PX4/FlightModesComponent.cc \
        src/AutoPilotPlugins/PX4/PX4AdvancedFlightModesController.cc \
        src/AutoPilotPlugins/PX4/PX4AirframeLoader.cc \
Gus Grubba's avatar
Gus Grubba committed
1118 1119
        src/AutoPilotPlugins/PX4/PX4AutoPilotPlugin.cc \
        src/AutoPilotPlugins/PX4/PX4RadioComponent.cc \
1120
        src/AutoPilotPlugins/PX4/PX4SimpleFlightModesController.cc \
Gus Grubba's avatar
Gus Grubba committed
1121
        src/AutoPilotPlugins/PX4/PX4TuningComponent.cc \
1122 1123 1124 1125 1126
        src/AutoPilotPlugins/PX4/PowerComponent.cc \
        src/AutoPilotPlugins/PX4/PowerComponentController.cc \
        src/AutoPilotPlugins/PX4/SafetyComponent.cc \
        src/AutoPilotPlugins/PX4/SensorsComponent.cc \
        src/AutoPilotPlugins/PX4/SensorsComponentController.cc \
Gus Grubba's avatar
Gus Grubba committed
1127 1128
        src/FirmwarePlugin/PX4/PX4FirmwarePlugin.cc \
        src/FirmwarePlugin/PX4/PX4ParameterMetaData.cc \
1129 1130 1131
}

PX4FirmwarePluginFactory {
Gus Grubba's avatar
Gus Grubba committed
1132 1133
    HEADERS   += src/FirmwarePlugin/PX4/PX4FirmwarePluginFactory.h
    SOURCES   += src/FirmwarePlugin/PX4/PX4FirmwarePluginFactory.cc
1134 1135 1136 1137 1138 1139 1140 1141 1142 1143
}

# Fact System code

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

HEADERS += \
    src/FactSystem/Fact.h \
1144
    src/FactSystem/FactControls/FactPanelController.h \
Gus Grubba's avatar
Gus Grubba committed
1145
    src/FactSystem/FactGroup.h \
1146 1147
    src/FactSystem/FactMetaData.h \
    src/FactSystem/FactSystem.h \
1148
    src/FactSystem/FactValueSliderListModel.h \
1149
    src/FactSystem/ParameterManager.h \
1150
    src/FactSystem/SettingsFact.h \
1151 1152 1153

SOURCES += \
    src/FactSystem/Fact.cc \
1154
    src/FactSystem/FactControls/FactPanelController.cc \
Gus Grubba's avatar
Gus Grubba committed
1155
    src/FactSystem/FactGroup.cc \
1156 1157
    src/FactSystem/FactMetaData.cc \
    src/FactSystem/FactSystem.cc \
1158
    src/FactSystem/FactValueSliderListModel.cc \
1159
    src/FactSystem/ParameterManager.cc \
1160
    src/FactSystem/SettingsFact.cc \
1161

1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172
#-------------------------------------------------------------------------------------
# MAVLink Inspector
contains (DEFINES, QGC_ENABLE_MAVLINK_INSPECTOR) {
    HEADERS += \
        src/AnalyzeView/MAVLinkInspectorController.h
    SOURCES += \
        src/AnalyzeView/MAVLinkInspectorController.cc
    QT += \
        charts
}

1173 1174
#-------------------------------------------------------------------------------------
# Taisync
1175 1176 1177 1178 1179 1180 1181
contains (DEFINES, QGC_GST_TAISYNC_DISABLED) {
    DEFINES -= QGC_GST_TAISYNC_ENABLED
    message("Taisync disabled")
} else {
    contains (DEFINES, QGC_GST_TAISYNC_ENABLED) {
        INCLUDEPATH += \
            src/Taisync
1182 1183

        HEADERS += \
1184 1185 1186
            src/Taisync/TaisyncManager.h \
            src/Taisync/TaisyncHandler.h \
            src/Taisync/TaisyncSettings.h \
1187 1188

        SOURCES += \
1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201
            src/Taisync/TaisyncManager.cc \
            src/Taisync/TaisyncHandler.cc \
            src/Taisync/TaisyncSettings.cc \

        iOSBuild | AndroidBuild {
            HEADERS += \
                src/Taisync/TaisyncTelemetry.h \
                src/Taisync/TaisyncVideoReceiver.h \

            SOURCES += \
                src/Taisync/TaisyncTelemetry.cc \
                src/Taisync/TaisyncVideoReceiver.cc \
        }
1202
    }
1203 1204
}

1205 1206
#-------------------------------------------------------------------------------------
# Microhard
1207 1208 1209 1210 1211 1212 1213 1214
QGC_GST_MICROHARD_DISABLED
contains (DEFINES, QGC_GST_MICROHARD_DISABLED) {
    DEFINES -= QGC_GST_MICROHARD_ENABLED
    message("Microhard disabled")
} else {
    contains (DEFINES, QGC_GST_MICROHARD_ENABLED) {
        INCLUDEPATH += \
            src/Microhard
1215

1216 1217 1218 1219
        HEADERS += \
            src/Microhard/MicrohardManager.h \
            src/Microhard/MicrohardHandler.h \
            src/Microhard/MicrohardSettings.h \
1220

1221 1222 1223 1224 1225
        SOURCES += \
            src/Microhard/MicrohardManager.cc \
            src/Microhard/MicrohardHandler.cc \
            src/Microhard/MicrohardSettings.cc \
    }
1226
}
1227 1228 1229 1230
#-------------------------------------------------------------------------------------
# AirMap

contains (DEFINES, QGC_AIRMAP_ENABLED) {
1231 1232 1233 1234 1235 1236

    #-- These should be always enabled but not yet
    INCLUDEPATH += \
        src/AirspaceManagement

    HEADERS += \
Gus Grubba's avatar
Gus Grubba committed
1237
        src/AirspaceManagement/AirspaceAdvisoryProvider.h \
Gus Grubba's avatar
Gus Grubba committed
1238
        src/AirspaceManagement/AirspaceFlightPlanProvider.h \
Gus Grubba's avatar
Gus Grubba committed
1239
        src/AirspaceManagement/AirspaceManager.h \
1240 1241 1242 1243
        src/AirspaceManagement/AirspaceRestriction.h \
        src/AirspaceManagement/AirspaceRestrictionProvider.h \
        src/AirspaceManagement/AirspaceRulesetsProvider.h \
        src/AirspaceManagement/AirspaceVehicleManager.h \
1244
        src/AirspaceManagement/AirspaceWeatherInfoProvider.h \
1245 1246

    SOURCES += \
Gus Grubba's avatar
Gus Grubba committed
1247
        src/AirspaceManagement/AirspaceAdvisoryProvider.cc \
Gus Grubba's avatar
Gus Grubba committed
1248
        src/AirspaceManagement/AirspaceFlightPlanProvider.cc \
Gus Grubba's avatar
Gus Grubba committed
1249
        src/AirspaceManagement/AirspaceManager.cc \
1250 1251 1252 1253
        src/AirspaceManagement/AirspaceRestriction.cc \
        src/AirspaceManagement/AirspaceRestrictionProvider.cc \
        src/AirspaceManagement/AirspaceRulesetsProvider.cc \
        src/AirspaceManagement/AirspaceVehicleManager.cc \
1254
        src/AirspaceManagement/AirspaceWeatherInfoProvider.cc \
1255 1256

    #-- This is the AirMap implementation of the above
1257 1258 1259 1260 1261 1262 1263
    RESOURCES += \
        src/Airmap/airmap.qrc

    INCLUDEPATH += \
        src/Airmap

    HEADERS += \
Gus Grubba's avatar
Gus Grubba committed
1264
        src/Airmap/AirMapAdvisoryManager.h \
1265
        src/Airmap/AirMapFlightManager.h \
Gus Grubba's avatar
Gus Grubba committed
1266
        src/Airmap/AirMapFlightPlanManager.h \
1267
        src/Airmap/AirMapManager.h \
1268 1269
        src/Airmap/AirMapRestrictionManager.h \
        src/Airmap/AirMapRulesetsManager.h \
1270
        src/Airmap/AirMapSettings.h \
1271 1272 1273 1274
        src/Airmap/AirMapSharedState.h \
        src/Airmap/AirMapTelemetry.h \
        src/Airmap/AirMapTrafficMonitor.h \
        src/Airmap/AirMapVehicleManager.h \
Gus Grubba's avatar
Gus Grubba committed
1275
        src/Airmap/AirMapWeatherInfoManager.h \
Gus Grubba's avatar
Gus Grubba committed
1276
        src/Airmap/LifetimeChecker.h \
1277 1278

    SOURCES += \
Gus Grubba's avatar
Gus Grubba committed
1279
        src/Airmap/AirMapAdvisoryManager.cc \
1280
        src/Airmap/AirMapFlightManager.cc \
Gus Grubba's avatar
Gus Grubba committed
1281
        src/Airmap/AirMapFlightPlanManager.cc \
1282
        src/Airmap/AirMapManager.cc \
1283 1284
        src/Airmap/AirMapRestrictionManager.cc \
        src/Airmap/AirMapRulesetsManager.cc \
1285
        src/Airmap/AirMapSettings.cc \
1286 1287 1288 1289
        src/Airmap/AirMapSharedState.cc \
        src/Airmap/AirMapTelemetry.cc \
        src/Airmap/AirMapTrafficMonitor.cc \
        src/Airmap/AirMapVehicleManager.cc \
Gus Grubba's avatar
Gus Grubba committed
1290
        src/Airmap/AirMapWeatherInfoManager.cc \
1291

Gus Grubba's avatar
Gus Grubba committed
1292 1293
    #-- Do we have an API key?
    exists(src/Airmap/Airmap_api_key.h) {
Stefan Dunca's avatar
Stefan Dunca committed
1294
        message("Using compile time Airmap API key")
Gus Grubba's avatar
Gus Grubba committed
1295 1296 1297 1298 1299
        HEADERS += \
            src/Airmap/Airmap_api_key.h
        DEFINES += QGC_AIRMAP_KEY_AVAILABLE
    }

1300 1301
    include(src/Airmap/QJsonWebToken/src/qjsonwebtoken.pri)

1302
} else {
1303 1304 1305
    #-- Dummies
    INCLUDEPATH += \
        src/Airmap/dummy
1306 1307
    RESOURCES += \
        src/Airmap/dummy/airmap_dummy.qrc
1308 1309 1310 1311
    HEADERS += \
        src/Airmap/dummy/AirspaceManager.h
    SOURCES += \
        src/Airmap/dummy/AirspaceManager.cc
1312 1313
}

1314 1315 1316 1317 1318 1319 1320 1321 1322
#-------------------------------------------------------------------------------------
# Video Streaming

INCLUDEPATH += \
    src/VideoStreaming

HEADERS += \
    src/VideoStreaming/VideoReceiver.h \
    src/VideoStreaming/VideoStreaming.h \
1323
    src/VideoStreaming/SubtitleWriter.h \
1324
    src/VideoStreaming/VideoManager.h
1325 1326 1327 1328

SOURCES += \
    src/VideoStreaming/VideoReceiver.cc \
    src/VideoStreaming/VideoStreaming.cc \
1329
    src/VideoStreaming/SubtitleWriter.cc \
1330
    src/VideoStreaming/VideoManager.cc
1331

1332
contains (CONFIG, DISABLE_VIDEOSTREAMING) {
1333 1334 1335 1336 1337 1338 1339 1340
    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)
}

1341 1342 1343 1344 1345 1346 1347
!VideoEnabled {
    HEADERS += \
       src/VideoStreaming/GLVideoItemStub.h
    SOURCES += \
        src/VideoStreaming/GLVideoItemStub.cc
}

1348 1349 1350 1351
#-------------------------------------------------------------------------------------
# Android

AndroidBuild {
Gus Grubba's avatar
Gus Grubba committed
1352 1353 1354 1355 1356
    contains (CONFIG, DISABLE_BUILTIN_ANDROID) {
        message("Skipping builtin support for Android")
    } else {
        include(android.pri)
    }
1357 1358
}

1359 1360 1361 1362 1363 1364 1365 1366
#-------------------------------------------------------------------------------------
#
# Localization
#

TRANSLATIONS += $$files($$PWD/localization/qgc_*.ts)
CONFIG+=lrelease embed_translations

1367 1368 1369 1370 1371
#-------------------------------------------------------------------------------------
#
# Post link configuration
#

1372 1373 1374 1375 1376
contains (CONFIG, QGC_DISABLE_BUILD_SETUP) {
    message("Disable standard build setup")
} else {
    include(QGCSetup.pri)
}
1377 1378 1379 1380 1381

#
# Installer targets
#

1382 1383 1384 1385 1386
contains (CONFIG, QGC_DISABLE_INSTALLER_SETUP) {
    message("Disable standard installer setup")
} else {
    include(QGCInstaller.pri)
}