blob: 6be190ea37ddaf12fe514744e0ec6b14e262333a (
plain)
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
|
TEMPLATE = app
QT += \
bluetooth \
core \
charts \
gui \
network \
qml \
quick \
widgets
CONFIG += c++11
DEFINES += QT_NO_FOREACH
# Specify UI layout to use: UI_SMALL or UI_WATCH
DEFINES += UI_WATCH
# To overcome the bug QTBUG-58648, uncomment this define
# Needed at least for RPi3 and iMX
#CONFIG += DEPLOY_TO_FS
win32|linux|android:!qnx {
CONFIG += BLUETOOTH_HOST
} else {
message(Unsupported target platform)
}
# For using MQTT upload enable this config.
# This enables both, host and client mode
# CONFIG += UPDATE_TO_MQTT_BROKER
# For using Azure cloud connectivity enable
# this config. This enabled both, host and
# client mode
# CONFIG += UPDATE_TO_AZURE
win32:!contains(CONFIG, UPDATE_TO_MQTT_BROKER) {
WASTORAGE_PATH = $$(WASTORAGE_LOCATION)
isEmpty(WASTORAGE_PATH): message("Location for Azure Storage libs unknown. Please specify WASTORAGE_LOCATION")
CPPRESTSDK_PATH = $$(CPPRESTSDK_LOCATION)
isEmpty(CPPRESTSDK_PATH): message("Location for CppRest library unknown. Please specify CPPREST_LOCATION")
INCLUDEPATH += $$WASTORAGE_PATH/build/native/include \
$$WASTORAGE_PATH/build/native/include/was \
$$WASTORAGE_PATH/build/native/include/wascore \
$$CPPRESTSDK_PATH/build/native/include
LIBS += -L$$WASTORAGE_PATH/lib/native/v140/Win32/Release
}
SOURCES += main.cpp \
mockdataprovider.cpp \
sensortagdataprovider.cpp \
clouddataprovider.cpp \
dataproviderpool.cpp \
clouddataproviderpool.cpp \
seriesstorage.cpp \
mockdataproviderpool.cpp
HEADERS += \
sensortagdataprovider.h \
mockdataprovider.h \
clouddataprovider.h \
cloudservice.h \
dataproviderpool.h \
clouddataproviderpool.h \
bluetoothapiconstants.h \
seriesstorage.h \
mockdataproviderpool.h
BLUETOOTH_HOST {
DEFINES += RUNS_AS_HOST
SOURCES += \
sensortagdataproviderpool.cpp \
bluetoothdataprovider.cpp \
demodataproviderpool.cpp \
serviceinfo.cpp \
bluetoothdevice.cpp
HEADERS += \
sensortagdataproviderpool.h \
bluetoothdataprovider.h \
demodataproviderpool.h \
serviceinfo.h \
bluetoothdevice.h
}
UPDATE_TO_MQTT_BROKER {
CONFIG -= UPDATE_TO_AZURE
!qtHaveModule(mqtt): error("Could not find MQTT module for Qt version")
QT += mqtt
DEFINES += MQTT_UPLOAD
SOURCES += mqttupdate.cpp \
mqttdataproviderpool.cpp \
mqttdataprovider.cpp
HEADERS += mqttupdate.h \
mqttdataproviderpool.h \
mqttdataprovider.h
}
UPDATE_TO_AZURE {
SOURCES += cloudupdate.cpp
HEADERS += cloudupdate.h
DEFINES += AZURE_UPLOAD
# For Azure libs
win32 {
LIBS += -lwastorage
} else {
LIBS += -lboost_system -lcrypto -lssl -lcpprest -lazurestorage
QMAKE_CXXFLAGS += -fpermissive
QMAKE_CXXFLAGS += -fexceptions
}
QMAKE_CXXFLAGS_EXCEPTIONS_OFF =
}
RESOURCES += base.qrc
android: ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android-sources
contains(DEFINES, UI_SMALL) {
!DEPLOY_TO_FS: RESOURCES += uismall.qrc
uiVariant.files = resources/small
} else:contains(DEFINES, UI_WATCH) {
!DEPLOY_TO_FS: RESOURCES += uiwatch.qrc
uiVariant.files = resources/watch
} else: error("No layout specified")
uiVariant.path = /opt/$${TARGET}/resources
# Additional import path used to resolve QML modules in Qt Creator's code model
QML_IMPORT_PATH =
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}
!isEmpty(target.path): INSTALLS += target
DISTFILES += \
android-sources/AndroidManifest.xml
DEPLOY_TO_FS {
message("Files will be deployed to the file system")
DEFINES += DEPLOY_TO_FS
baseFiles.files = resources/base
baseFiles.path = /opt/$${TARGET}/resources
INSTALLS += baseFiles uiVariant
}
|