/
ArcGISRuntimeSDKQt_QMLSamples.pro
237 lines (203 loc) · 8.62 KB
/
ArcGISRuntimeSDKQt_QMLSamples.pro
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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
# Copyright 2017 ESRI
#
# All rights reserved under the copyright laws of the United States
# and applicable international laws, treaties, and conventions.
#
# You may freely redistribute and use this sample code, with or
# without modification, provided you include the original copyright
# notice and use restrictions.
#
# See the Sample code usage restrictions document for further information.
TEMPLATE = app
QT += core gui xml network qml quick positioning sensors multimedia \
widgets quickcontrols2 opengl webview texttospeech
TARGET = ArcGISQt_QMLSamples
DEFINES += QML_VIEWER
DEFINES += Qt_Version=\"$$QT_VERSION\"
SAMPLEPATHQML = $$PWD/../../ArcGISRuntimeSDKQt_QMLSamples
COMMONVIEWER = $$PWD/../ArcGISRuntimeSDKQt_Samples
ARCGIS_RUNTIME_VERSION = 100.15.0
DEFINES += ArcGIS_Runtime_Version=$$ARCGIS_RUNTIME_VERSION
# This block determines whether to build against the SDK dev build area or the installed SDK
exists($$PWD/../../../../DevBuildQml.pri) {
message("Building against the dev environment")
DEFINES += ESRI_BUILD
DEFINES += SAMPLE_VIEWER_API_KEY=$$(SAMPLEVIEWERAPIKEY_RELEASE)
# use the Esri dev build script
include ($$PWD/../../../../DevBuildQml.pri)
# include the toolkitqml.pri, which contains all the toolkit resources
include($$PWD/../../../toolkit/uitools/toolkitqml.pri)
} else {
message("Building against the installed SDK")
CONFIG+=build_from_setup
CONFIG += c++14
# include the toolkitqml.pri, which contains all the toolkit resources
!include($$PWD/../../arcgis-runtime-toolkit-qt/uitools/toolkitqml.pri) {
message("ERROR: Cannot find toolkitqml.pri at path:" $$PWD/../../arcgis-runtime-toolkit-qt/uitools/toolkitqml.pri)
message("Please ensure the Qt Toolkit repository is cloned and the path above is correct.")
}
contains(QMAKE_HOST.os, Windows):{
iniPath = $$(ALLUSERSPROFILE)\\EsriRuntimeQt\\ArcGIS Runtime SDK for Qt $${ARCGIS_RUNTIME_VERSION}.ini
}
else {
userHome = $$system(echo $HOME)
iniPath = $${userHome}/.config/EsriRuntimeQt/ArcGIS Runtime SDK for Qt $${ARCGIS_RUNTIME_VERSION}.ini
}
iniLine = $$cat($${iniPath}, "lines")
dirPath = $$find(iniLine, "InstallDir")
cleanDirPath = $$replace(dirPath, "InstallDir=", "")
priLocation = $$replace(cleanDirPath, '"', "")
!include($$priLocation/sdk/ideintegration/arcgis_runtime_qml.pri) {
message("Error. Cannot locate ArcGIS Runtime PRI file")
}
DEFINES += BUILD_FROM_SETUP
}
# Set analytics API key and stream id, these will be empty strings if not provided in the command line arguments
DEFINES += GANALYTICS_API_KEY=$$(GANALYTICS_API_KEY)
DEFINES += GANALYTICS_STREAM_ID=$$(GANALYTICS_STREAM_ID)
qtHaveModule(webengine) {
QT += webengine
DEFINES += QT_WEBVIEW_WEBENGINE_BACKEND
}
QMAKE_TARGET_COMPANY = Esri, Inc.
QMAKE_TARGET_PRODUCT = ArcGIS Runtime SDK for Qt Samples - QML
QMAKE_TARGET_DESCRIPTION = ArcGIS Runtime SDK for Qt Samples - QML
QMAKE_TARGET_COPYRIGHT = Copyright 2017 Esri Inc.
# include the samples.pri, which contains all the sample resources
include(samples.pri)
PRECOMPILED_HEADER = $$COMMONVIEWER/pch.hpp
CONFIG += precompile_header
DEFINES += PCH_BUILD
android {
QMAKE_CXXFLAGS_USE_PRECOMPILE = -include-pch \${QMAKE_PCH_OUTPUT}
PRECOMPILED_DIR = pch
}
INCLUDEPATH += \
$$COMMONVIEWER \
$$COMMONVIEWER/SyntaxHighlighter
HEADERS += \
QmlSampleManager.h \
$$COMMONVIEWER/pch.hpp \
$$COMMONVIEWER/SyntaxHighlighter/syntax_highlighter.h \
$$COMMONVIEWER/SyntaxHighlighter/QMLHighlighter.h \
$$COMMONVIEWER/CategoryListModel.h \
$$COMMONVIEWER/DataItem.h \
$$COMMONVIEWER/DataItemListModel.h \
$$COMMONVIEWER/DownloadSampleManager.h \
$$COMMONVIEWER/GAnalytics.h \
$$COMMONVIEWER/Sample.h \
$$COMMONVIEWER/SampleCategory.h \
$$COMMONVIEWER/SampleListModel.h \
$$COMMONVIEWER/SampleManager.h \
$$COMMONVIEWER/SampleManager_definitions.h \
$$COMMONVIEWER/SampleSearchFilterModel.h \
$$COMMONVIEWER/SearchFilterCriteria.h \
$$COMMONVIEWER/SearchFilterKeywordCriteria.h \
$$COMMONVIEWER/SearchFilterSimpleKeywordCriteria.h \
$$COMMONVIEWER/SourceCode.h \
$$COMMONVIEWER/SourceCodeListModel.h \
$$COMMONVIEWER/PermissionsHelper.h
SOURCES += \
QmlSampleManager.cpp \
$$COMMONVIEWER/SyntaxHighlighter/syntax_highlighter.cpp \
$$COMMONVIEWER/SyntaxHighlighter/QMLHighlighter.cpp \
$$COMMONVIEWER/CategoryListModel.cpp \
$$COMMONVIEWER/DataItem.cpp \
$$COMMONVIEWER/DataItemListModel.cpp \
$$COMMONVIEWER/DownloadSampleManager.cpp \
$$COMMONVIEWER/GAnalytics.cpp \
$$COMMONVIEWER/Sample.cpp \
$$COMMONVIEWER/SampleCategory.cpp \
$$COMMONVIEWER/SampleListModel.cpp \
$$COMMONVIEWER/SampleManager.cpp \
$$COMMONVIEWER/SampleSearchFilterModel.cpp \
$$COMMONVIEWER/SearchFilterCriteria.cpp \
$$COMMONVIEWER/SearchFilterKeywordCriteria.cpp \
$$COMMONVIEWER/SearchFilterSimpleKeywordCriteria.cpp \
$$COMMONVIEWER/SourceCode.cpp \
$$COMMONVIEWER/SourceCodeListModel.cpp \
$$COMMONVIEWER/mainSample.cpp \
$$COMMONVIEWER/PermissionsHelper.cpp
RESOURCES += \
imports.qrc \
qml/qmlsamples.qrc \
$$COMMONVIEWER/qml/qml.qrc \
$$COMMONVIEWER/images/images.qrc \
$$COMMONVIEWER/resources/application.qrc \
$$COMMONVIEWER/Samples/Categories.qrc
DEFINES += QT_DEPRECATED_WARNINGS
#-------------------------------------------------
# Application Icon
#-------------------------------------------------
CONFIG(build_from_setup) {
win32 {
OTHER_FILES += \
$$COMMONVIEWER/images/ArcGISRuntimeSDKQtSamples.ico
}
} else {
win32 {
RC_FILE = ArcGISRuntimeSDKQt_QMLSamples.rc
OTHER_FILES += \
$$COMMONVIEWER/images/ArcGISRuntimeSDKQtSamples.ico \
ArcGISRuntimeSDKQt_QMLSamples.rc
}
}
mac {
ICON = $$COMMONVIEWER/images/ArcGISRuntimeSDKQtSamples.icns
OTHER_FILES += \
$$COMMONVIEWER/ArcGISRuntimeSDKQtSamples.icns
QMAKE_INFO_PLIST = $$PWD/mac/Info.plist
}
android {
QT += androidextras
CONFIG(build_from_setup) {
for (ABI, ANDROID_ABIS): {
ANDROID_SSL_DIR = $$dirname(QMAKE_QMAKE)/../lib/ssl/$${ABI}
LIST_SSL_LIBS = libcrypto_1_1.so libssl_1_1.so
for(lib, LIST_SSL_LIBS) {
exists($$ANDROID_SSL_DIR/$${lib}) {
ANDROID_EXTRA_LIBS += $$ANDROID_SSL_DIR/$${lib}
}
else {
error($$ANDROID_SSL_DIR is missing the $${lib} library which is required to build this Android application.)
}
}
}
}
DISTFILES += \
android/AndroidManifest.xml \
android/res/values/libs.xml
ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android
}
ios {
ios_icon.files = $$files($$PWD/iOS/Images.xcassets/AppIcon.appiconset/iOS_*.png)
QMAKE_BUNDLE_DATA += ios_icon
OTHER_FILES += \
$$PWD/iOS/Info.plist \
$$PWD/iOS/Images.xcassets/AppIcon.appiconset/Contents.json \
$$PWD/iOS/Images.xcassets/LaunchImage.launchimage/Contents.json
QMAKE_INFO_PLIST = $$PWD/iOS/Info.plist
TARGET2 = $$replace(TARGET, "_", "-") # xcode replaces _ with - in provisioning profiles
APP_PROVISIONED = $$system(if grep -sq $$TARGET2 ~/Library/MobileDevice/Provisioning\ Profiles/* ; then echo true ; fi)
!equals(APP_PROVISIONED, "true") {
XCODE_PROJ = $$OUT_PWD/$${TARGET}.xcodeproj
exists($$XCODE_PROJ) {
system(open -g -a Xcode --args $${XCODE_PROJ})
system(for i in {1..90}; do if grep -sq $$TARGET2 ~/Library/MobileDevice/Provisioning\ Profiles/* ; then break; else sleep 1; fi ; done)
system(osascript -e \'quit app \"Xcode\"\')
}
}
}
CONFIG(daily){
CONFIG(release, debug | release){
win32 {
contains(QT_ARCH, i386) {
message($${PWD}/../../../scripts/windows/deploy_windows.bat -bin $${DESTDIR} -dep ArcGISRuntimeSDKQt_QMLSamples -exe ArcGISQt_QMLSamples.exe -qt $${QMAKESPEC}/../.. -b x86 -toolkit -tk_qml)
QMAKE_POST_LINK +=$$quote(cmd /c $${PWD}/../../../scripts/windows/deploy_windows.bat -bin $${DESTDIR} -dep ArcGISRuntimeSDKQt_QMLSamples -exe ArcGISQt_QMLSamples.exe -qt $${QMAKESPEC}/../.. -b x86 -toolkit -tk_qml $$escape_expand(\n\t))
} else {
message($${PWD}/../../../scripts/windows/deploy_windows.bat -bin $${DESTDIR} -dep ArcGISRuntimeSDKQt_QMLSamples -exe ArcGISQt_QMLSamples.exe -qt $${QMAKESPEC}/../.. -b x64 -toolkit -tk_qml)
QMAKE_POST_LINK +=$$quote(cmd /c $${PWD}/../../../scripts/windows/deploy_windows.bat -bin $${DESTDIR} -dep ArcGISRuntimeSDKQt_QMLSamples -exe ArcGISQt_QMLSamples.exe -qt $${QMAKESPEC}/../.. -b x64 -toolkit -tk_qml $$escape_expand(\n\t))
}
}
}
}