summaryrefslogtreecommitdiffstats
path: root/tradeshow/iot-sensortag/SensorTagDemo.pro
blob: f1df6d68a7025697b68e38dc086ffa1c92ed0adc (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
TEMPLATE = app

QT += 3dcore 3drender 3dinput 3dquick 3dlogic core gui qml quick 3dquickextras widgets
QT += bluetooth network
CONFIG += c++11

# 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_LINUX_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 {
    # Obtained via NuGet
    isEmpty(WASTORAGE_LOCATION): WASTORAGE_LOCATION = "C:/Users/mauri/Documents/Visual Studio 2015/Projects/App1/packages/wastorage.v140.2.6.0"
    INCLUDEPATH += $$WASTORAGE_LOCATION/build/native/include \
                   $$WASTORAGE_LOCATION/build/native/include/was \
                   $$WASTORAGE_LOCATION/build/native/include/wascore
    LIBS += -L$$WASTORAGE_LOCATION/lib/native/v140/Win32/Release

    isEmpty(CPPRESTSDK_LOCATION): CPPRESTSDK_LOCATION = "C:/Users/mauri/Documents/Visual Studio 2015/Projects/App1/packages/cpprestsdk.v140.windesktop.msvcstl.dyn.rt-dyn.2.9.1"
    INCLUDEPATH += $$CPPRESTSDK_LOCATION/build/native/include
}

SOURCES += main.cpp \
    mockdataprovider.cpp \
    sensortagdataprovider.cpp \
    clouddataprovider.cpp \
    dataproviderpool.cpp \
    clouddataproviderpool.cpp \
    demodataproviderpool.cpp

HEADERS += \
    sensortagdataprovider.h \
    mockdataprovider.h \
    clouddataprovider.h \
    cloudservice.h \
    dataproviderpool.h \
    clouddataproviderpool.h \
    demodataproviderpool.h

BLUETOOTH_LINUX_HOST {
    !winrt:CONFIG += UPDATE_TO_CLOUD
    DEFINES += RUNS_AS_HOST

    SOURCES += \
        sensortagdataproviderpool.cpp \
        bluetoothdataprovider.cpp \
        serviceinfo.cpp \
        bluetoothdevice.cpp \
        characteristicinfo.cpp

    HEADERS += \
        sensortagdataproviderpool.h \
        bluetoothdataprovider.h \
        serviceinfo.h \
        bluetoothdevice.h \
        characteristicinfo.h
}

UPDATE_TO_CLOUD {
    SOURCES += cloudupdate.cpp
    HEADERS += cloudupdate.h
    DEFINES += CLOUD_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
    RESOURCES += uismall.qrc
    message("Resource file for SMALL display picked")
}

equals(DEVICE_TYPE, "UI_MEDIUM") {
    DEFINES += UI_MEDIUM
    RESOURCES += uimedium.qrc
    message("Resource file for MEDIUM display picked")
}

equals(DEVICE_TYPE, "UI_LARGE") {
    DEFINES += UI_LARGE
    RESOURCES += uilarge.qrc
    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}/bin
!isEmpty(target.path): INSTALLS += target

DISTFILES += \
    android-sources/AndroidManifest.xml