-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHMIFramework.pro
More file actions
158 lines (136 loc) · 4.16 KB
/
HMIFramework.pro
File metadata and controls
158 lines (136 loc) · 4.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
QT += core gui concurrent
QT += serialbus
QT += quick
QT += qml
static {
QT += svg
QTPLUGIN += qtvirtualkeyboardplugin
}
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
# CONFIG += c++11
DEFINES += QT_DEPRECATED_WARNINGS
#
# 品牌
#
DEFINES += APPLICATION_NAME=\"\\\"HMIFramework\\\"\"
DEFINES += ORG_NAME=\"\\\"umltech.org\\\"\"
# 设置构建目录
DESTDIR = $${OUT_PWD}/bin
OBJECTS_DIR = $${OUT_PWD}/build/obj
MOC_DIR = $${OUT_PWD}/build/moc
UI_DIR = $${OUT_PWD}/build/ui
RCC_DIR = $${OUT_PWD}/build/rcc
QMLCACHE_DIR = $${OUT_PWD}/build/qmlcache
# 设置版本号(从git获取)
exists ($$PWD/.git) {
GIT_DESCRIBE = $$system(git --git-dir $$PWD/.git --work-tree $$PWD describe --always --tags)
GIT_BRANCH = $$system(git --git-dir $$PWD/.git --work-tree $$PWD rev-parse --abbrev-ref HEAD)
GIT_HASH = $$system(git --git-dir $$PWD/.git --work-tree $$PWD rev-parse --short HEAD)
GIT_TIME = $$system(git --git-dir $$PWD/.git --work-tree $$PWD show --oneline --format=\"%ci\" -s HEAD)
# 设置设备标号
contains(GIT_DESCRIBE, v[0-9]+.[0-9]+.[0-9]+) {
# 发布版本 "vX.Y.Z"
GIT_VERSION = $${GIT_DESCRIBE}
VERSION = $$replace(GIT_DESCRIBE, "v", "")
VERSION = $$replace(VERSION, "-", ".")
VERSION = $$section(VERSION, ".", 0, 3)
} else {
# 开发版本 "Development branch:sha date"
GIT_VERSION = "Development $${GIT_BRANCH}:$${GIT_HASH} $${GIT_TIME}"
VERSION = 0.0.0
}
message(HMI $${GIT_VERSION})
} else {
GIT_VERSION = None
VERSION = 0.0.0 # Marker to indicate out-of-tree build
MAC_VERSION = 0.0.0
MAC_BUILD = 0
}
DEFINES += GIT_VERSION=\"\\\"$$GIT_VERSION\\\"\"
INCLUDEPATH += .
INCLUDEPATH += \
src \
src/factsystem \
src/vehicles \
src/settings \
src/links \
src/QmlControls \
src/ui
SOURCES += \
src/HMILoggingCategory.cc \
src/HMIPalette.cc \
src/HMIQmlGlobal.cpp \
src/QmlControls/AppMessages.cc \
src/QmlControls/ScreenToolsController.cc \
src/Tool.cpp \
src/Toolbox.cpp \
src/XApplication.cpp \
src/factsystem/Fact.cpp \
src/factsystem/FactGroup.cpp \
src/factsystem/FactMetaData.cpp \
src/factsystem/FactSystem.cc \
src/factsystem/JsonHelper.cc \
src/factsystem/SettingsFact.cpp \
src/links/CanLink.cpp \
src/links/CanLinkProtocol.cpp \
src/links/LinkManager.cpp \
src/main.cpp \
src/settings/AppSettings.cpp \
src/settings/SettingsGroup.cpp \
src/settings/SettingsManager.cpp \
src/ui/Dialog2.cpp \
src/ui/MessageDialog.cpp \
src/ui/numkeyboard.cpp \
src/ui/softkeylineedit.cpp \
src/vehicles/Vehicle.cpp \
src/vehicles/VehicleManager.cpp
HEADERS += \
src/HMILoggingCategory.h \
src/HMIPalette.h \
src/HMIQmlGlobal.h \
src/QmlControls/AppMessages.h \
src/QmlControls/ScreenToolsController.h \
src/Tool.h \
src/Toolbox.h \
src/XApplication.h \
src/factsystem/Fact.h \
src/factsystem/FactGroup.h \
src/factsystem/FactMetaData.h \
src/factsystem/FactSystem.h \
src/factsystem/JsonHelper.h \
src/factsystem/SettingsFact.h \
src/links/CanLink.h \
src/links/CanLinkProtocol.h \
src/links/LinkManager.h \
src/settings/AppSettings.h \
src/settings/SettingsGroup.h \
src/settings/SettingsManager.h \
src/ui/Dialog2.h \
src/ui/MessageDialog.h \
src/ui/numkeyboard.h \
src/ui/softkeylineedit.h \
src/vehicles/Vehicle.h \
src/vehicles/VehicleManager.h
FORMS += \
src/ui/Dialog2.ui \
src/ui/MessageDialog.ui \
src/ui/numkeyboard.ui
#
TARGET = run
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /home/root/client
!isEmpty(target.path): INSTALLS += target
RESOURCES += \
HMIFramework.qrc \
hmiimages.qrc \
hmiresources.qrc
QML_IMPORT_PATH += $$PWD/src/QmlControls
DISTFILES += \
src/QmlControls/HMI/Specific/qmldir
#-------------------------------------------------------------------------------------
#
# Localization
#
TRANSLATIONS += $$files($$PWD/localization/qgc*.ts)
CONFIG+=lrelease embed_translations