blob: bd79351611a24e17c259a4fc8ffae0fcfa2290b0 (
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
|
TEMPLATE = app
QT += 3dcore 3drender 3dinput 3dquick 3dlogic core gui qml quick 3dquickextras widgets
QT += bluetooth network charts
CONFIG += c++11
DEFINES += QT_NO_FOREACH
# To overcome the bug QTBUG-58648, uncomment this define
# Needed at least for RPi3 and iMX
#CONFIG += DEPLOY_TO_FS
# Uncomment DEVICE_TYPE and assign either UI_SMALL, UI_MEDIUM, UI_LARGE
# to force using that UI form factor. Otherwise
# the form factor is determined based on the platform
DEVICE_TYPE = UI_SMALL
# If DEVICE_TYPE is not set manually, try to determine
# the correct device type by the used operating system
win32|linux:!android:!qnx {
CONFIG += BLUETOOTH_HOST
isEmpty(DEVICE_TYPE) { DEVICE_TYPE = UI_SMALL }
} else:android {
isEmpty(DEVICE_TYPE) { DEVICE_TYPE = UI_MEDIUM }
ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android-sources
QMAKE_CXX_FLAGS -= -DQT_OPENGL_FORCE_SHADER_DEFINES
} else:ios {
isEmpty(DEVICE_TYPE) { DEVICE_TYPE = UI_MEDIUM }
}
win32 {
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 {
win32 {
!isEmpty(WASTORAGE_PATH):!isEmpty(CPPRESTSDK_LOCATION): CONFIG += UPDATE_TO_AZURE
} else {
CONFIG += UPDATE_TO_AZURE
}
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_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
equals(DEVICE_TYPE, "UI_SMALL") {
DEFINES += UI_SMALL
!DEPLOY_TO_FS: RESOURCES += uismall.qrc
uiVariant.files = resources/small
uiVariant.path = /opt/$${TARGET}/resources
message("Resource file for SMALL display picked")
}
equals(DEVICE_TYPE, "UI_MEDIUM") {
DEFINES += UI_MEDIUM
!DEPLOY_TO_FS: RESOURCES += uimedium.qrc
uiVariant.files = resources/medium
uiVariant.path = /opt/$${TARGET}/resources
message("Resource file for MEDIUM display picked")
}
equals(DEVICE_TYPE, "UI_LARGE") {
DEFINES += UI_LARGE
!DEPLOY_TO_FS: RESOURCES += uilarge.qrc
uiVariant.files = resources/large
uiVariant.path = /opt/$${TARGET}/resources
message("Resource file for LARGE display picked")
}
# 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
}
|