Files
gcs-nf/App/App.pro
T
2020-10-11 19:10:57 +08:00

196 lines
5.3 KiB
Prolog

#-------------------------------------------------
#
# Project created by QtCreator 2019-12-13T23:38:22
#
#-------------------------------------------------
QT += core gui network
QT += serialport
QT += quickwidgets
QT += opengl
QT += sql
QT += svg
QT += texttospeech
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
# 获取当前的版本号,分支等
exists (../.git) {
GIT_HEAD = $$system(git rev-list --tags --max-count=1)
GIT_TAG = $$system(git describe --tags $${GIT_HEAD})
GIT_BRANCH = $$system(git rev-parse --abbrev-ref HEAD)
GIT_TIME = $$system(git show --oneline --format=\"%ci%H\" -s HEAD)
APP_VERSION = "$${GIT_TAG} $${GIT_BRANCH} $${GIT_TIME}"
} else {
APP_VERSION = None
}
DEFINES += APP_VERSION=\"\\\"$$APP_VERSION\\\"\"
msvc {
QMAKE_CFLAGS += /utf-8
QMAKE_CXXFLAGS += /utf-8
}
include(./ComponentUI/ComponentUI.pri)
include (./ToolsUI/ToolsUI.pri)
#include (./About/About.pri)
include (./Setting/Setting.pri)
#include (./Help/Help.pri)
include (./MissionUI/MissionUI.pri)
include (./MenuBarUI/MenuBarUI.pri)
include (./CommandUI/CommandUI.pri)
include (./CheckUI/CheckUI.pri)
include (./Config/Config.pri)
include (./StatusUI/StatusUI.pri)
include (./CommandBox/CommandBox.pri)
include (./HealthUI/HealthUI.pri)
win32:
{
VERSION = 1.0.0.0
QMAKE_TARGET_PRODUCT = Ground Control Station
QMAKE_TARGET_COMPANY = company
QMAKE_TARGET_DESCRIPTION = UAV Ground Control Station
QMAKE_TARGET_COPYRIGHT = copyright
}
CONFIG(debug, debug|release) {
# Target name.
TARGET = GCS_debug
}
CONFIG(release, debug|release) {
# Target name.
TARGET = GCS_release
}
TEMPLATE = app
# The following define makes your compiler emit warnings if you use
# any feature of Qt which has been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
CONFIG += c++11 \
warn_off
SOURCES += \
main.cpp \
mainwindow.cpp
HEADERS += \
mainwindow.h
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
# Additional import path used to resolve QML modules in Qt Creator's code model
QML_IMPORT_PATH += $$PWD
# Additional import path used to resolve QML modules just for Qt Quick Designer
QML_DESIGNER_IMPORT_PATH += $$PWD
#添加程序运行的第三方库
INCLUDEPATH += $$PWD/../thirdpart/include
#添加mavlink目录(给mavlinknode模块打补丁)
INCLUDEPATH += $$PWD/../mavlink \
$$PWD/../mavlink/ardupilotmega \
$$PWD/../mavlink/common \
$$PWD/../mavlink/icarous \
$$PWD/../mavlink/uAvionix \
$$PWD/../mavlink/XYK \
$$PWD/../mavlink/message_definitions
# Capture whether this is a release/debug build.
CONFIG(debug, debug|release) {
LIBS += -L$$PWD/../thirdpart/lib -lCockpitd
LIBS += -L$$PWD/../thirdpart/lib -lMavLinkNoded
LIBS += -L$$PWD/../thirdpart/lib -lcored
LIBS += -L$$PWD/../thirdpart/lib -linternalsd
LIBS += -L$$PWD/../thirdpart/lib -lopmapwidgetd
LIBS += -L$$PWD/../thirdpart/lib -lDlinkd
LIBS += -L$$PWD/../thirdpart/lib -lSkind
}
CONFIG(release, debug|release) {
LIBS += -L$$PWD/../thirdpart/lib -lCockpit
LIBS += -L$$PWD/../thirdpart/lib -lMavLinkNode
LIBS += -L$$PWD/../thirdpart/lib -lcore
LIBS += -L$$PWD/../thirdpart/lib -linternals
LIBS += -L$$PWD/../thirdpart/lib -lopmapwidget
LIBS += -L$$PWD/../thirdpart/lib -lDlink
LIBS += -L$$PWD/../thirdpart/lib -lSkin
}
#temp file
DESTDIR = $$PWD/../app_bin
MOC_DIR = $$PWD/../build
OBJECTS_DIR = $$PWD/../build
#复制运行库到程序目录
win32|win64 {
src_dir = $$PWD\\..\\thirdpart\\lib\\*.dll
dst_dir = $$PWD\\..\\app_bin\\
# dst_dir 最后的 \\ 是必须的,用来标示 xcopy 到一个文件夹,若不存在,创建之
# Replace slashes in paths with backslashes for Windows
src_dir ~= s,/,\\,g
dst_dir ~= s,/,\\,g
#要发布时要打开,复制必要的库文件
#system(xcopy $$src_dir $$dst_dir /y /e)
#复制qml文件
qml_src_dir = $$PWD\\*.qml
qml_dst_dir = $$PWD\\..\\app_bin\\qml\\
# dst_dir 最后的 \\ 是必须的,用来标示 xcopy 到一个文件夹,若不存在,创建之
# Replace slashes in paths with backslashes for Windows
qml_src_dir ~= s,/,\\,g
qml_dst_dir ~= s,/,\\,g
system(xcopy $$qml_src_dir $$qml_dst_dir /y /s)
}
#编译HDMI版本,方便适配大屏显示
DEFINES += BUILD_WITH_HDMI
TRANSLATIONS += GCS_zh_CN.ts
RESOURCES += \
res.qrc
RC_FILE += version.rc