custom.pri 2.53 KB
Newer Older
1 2 3 4 5 6 7 8 9
message("Adding Custom Plugin")

#-- Version control
#   Major and minor versions are defined here (manually)

CUSTOM_QGC_VER_MAJOR = 0
CUSTOM_QGC_VER_MINOR = 0
CUSTOM_QGC_VER_FIRST_BUILD = 0

Gus Grubba's avatar
Gus Grubba committed
10 11
# Build number is automatic
# Uses the current branch. This way it works on any branch including build-server's PR branches
12 13 14 15 16 17 18 19 20 21 22 23 24
CUSTOM_QGC_VER_BUILD = $$system(git --git-dir ../.git rev-list $$GIT_BRANCH --first-parent --count)
win32 {
    CUSTOM_QGC_VER_BUILD = $$system("set /a $$CUSTOM_QGC_VER_BUILD - $$CUSTOM_QGC_VER_FIRST_BUILD")
} else {
    CUSTOM_QGC_VER_BUILD = $$system("echo $(($$CUSTOM_QGC_VER_BUILD - $$CUSTOM_QGC_VER_FIRST_BUILD))")
}
CUSTOM_QGC_VERSION = $${CUSTOM_QGC_VER_MAJOR}.$${CUSTOM_QGC_VER_MINOR}.$${CUSTOM_QGC_VER_BUILD}

DEFINES -= GIT_VERSION=\"\\\"$$GIT_VERSION\\\"\"
DEFINES += GIT_VERSION=\"\\\"$$CUSTOM_QGC_VERSION\\\"\"

message(Custom QGC Version: $${CUSTOM_QGC_VERSION})

Gus Grubba's avatar
Gus Grubba committed
25
# Build a single flight stack by disabling APM support
26 27
MAVLINK_CONF = common
CONFIG  += QGC_DISABLE_APM_MAVLINK
Gus Grubba's avatar
Gus Grubba committed
28
CONFIG  += QGC_DISABLE_APM_PLUGIN QGC_DISABLE_APM_PLUGIN_FACTORY
29

Gus Grubba's avatar
Gus Grubba committed
30 31
# We implement our own PX4 plugin factory
CONFIG  += QGC_DISABLE_PX4_PLUGIN_FACTORY
32

Gus Grubba's avatar
Gus Grubba committed
33
# Branding
34 35 36 37

DEFINES += CUSTOMHEADER=\"\\\"CustomPlugin.h\\\"\"
DEFINES += CUSTOMCLASS=CustomPlugin

38 39
TARGET   = MyGroundStation
DEFINES += QGC_APPLICATION_NAME='"\\\"Custom QGroundControl\\\""'
40 41 42 43

DEFINES += QGC_ORG_NAME=\"\\\"qgroundcontrol.org\\\"\"
DEFINES += QGC_ORG_DOMAIN=\"\\\"org.qgroundcontrol\\\"\"

44 45
QGC_APP_NAME        = "Custom QGroundControl"
QGC_BINARY_NAME     = "CustomQGroundControl"
46
QGC_ORG_NAME        = "Custom"
47 48 49
QGC_ORG_DOMAIN      = "org.custom"
QGC_APP_DESCRIPTION = "Custom QGroundControl"
QGC_APP_COPYRIGHT   = "Copyright (C) 2020 QGroundControl Development Team. All rights reserved."
50

Gus Grubba's avatar
Gus Grubba committed
51 52
# Our own, custom resources
RESOURCES += \
53
    $$PWD/custom.qrc
Gus Grubba's avatar
Gus Grubba committed
54

55
QML_IMPORT_PATH += \
56
   $$PWD/res
57

Gus Grubba's avatar
Gus Grubba committed
58
# Our own, custom sources
59 60 61 62 63 64 65 66 67 68 69 70 71
SOURCES += \
    $$PWD/src/CustomPlugin.cc \

HEADERS += \
    $$PWD/src/CustomPlugin.h \

INCLUDEPATH += \
    $$PWD/src \

#-------------------------------------------------------------------------------------
# Custom Firmware/AutoPilot Plugin

INCLUDEPATH += \
72 73
    $$PWD/src/FirmwarePlugin \
    $$PWD/src/AutoPilotPlugin
74 75

HEADERS+= \
76 77 78
    $$PWD/src/AutoPilotPlugin/CustomAutoPilotPlugin.h \
    $$PWD/src/FirmwarePlugin/CustomFirmwarePlugin.h \
    $$PWD/src/FirmwarePlugin/CustomFirmwarePluginFactory.h \
79 80

SOURCES += \
81 82 83
    $$PWD/src/AutoPilotPlugin/CustomAutoPilotPlugin.cc \
    $$PWD/src/FirmwarePlugin/CustomFirmwarePlugin.cc \
    $$PWD/src/FirmwarePlugin/CustomFirmwarePluginFactory.cc \
84