summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@qt.io>2017-08-15 13:21:48 +0200
committerPaolo Angelelli <paolo.angelelli@qt.io>2017-08-30 12:59:24 +0000
commit3856f0185442b5c4b85c770888072db0bc3fff1a (patch)
treec8427301092a696e2a888f5f236791177f5625c3
parentf1466b2cd387e2892b79db110979a893f0a0954b (diff)
downloadqtlocation-3856f0185442b5c4b85c770888072db0bc3fff1a.tar.gz
Add a configure feature for each geoservice plugin
This patch makes it possible to disable geoservice plugins at configuration time using the QtLite -no-feature-geoservices_xxx syntax. Change-Id: I276382833db8cfca27383705cbb3f994ced47cb3 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
-rw-r--r--configure.json3
-rw-r--r--src/location/configure.json70
-rw-r--r--src/plugins/geoservices/geoservices.pro12
-rw-r--r--src/positioning/configure.json2
4 files changed, 80 insertions, 7 deletions
diff --git a/configure.json b/configure.json
index d54624af..379d8b4a 100644
--- a/configure.json
+++ b/configure.json
@@ -1,5 +1,6 @@
{
"subconfigs": [
- "src/positioning"
+ "src/positioning",
+ "src/location"
]
}
diff --git a/src/location/configure.json b/src/location/configure.json
new file mode 100644
index 00000000..4de6e865
--- /dev/null
+++ b/src/location/configure.json
@@ -0,0 +1,70 @@
+{
+ "module": "location",
+ "depends": [
+ "gui"
+ ],
+
+ "features": {
+ "geoservices_osm": {
+ "label": "OpenStreetMap",
+ "purpose": "Provides access to OpenStreetMap geoservices",
+ "section": "Location",
+ "condition": "features.concurrent",
+ "output": [ "privateFeature" ]
+ },
+ "geoservices_here": {
+ "label": "HERE",
+ "purpose": "Provides access to HERE geoservices",
+ "section": "Location",
+ "output": [ "privateFeature" ]
+ },
+ "geoservices_esri": {
+ "label": "Esri",
+ "purpose": "Provides access to Esri geoservices",
+ "section": "Location",
+ "output": [ "privateFeature" ]
+ },
+ "geoservices_mapbox": {
+ "label": "Mapbox",
+ "purpose": "Provides access to Mapbox geoservices",
+ "section": "Location",
+ "output": [ "privateFeature" ]
+ },
+ "geoservices_mapboxgl": {
+ "label": "MapboxGL",
+ "purpose": "Provides access to the Mapbox vector maps",
+ "section": "Location",
+ "condition": [
+ "features.opengl",
+ "features.c++14",
+ "!config.qnx && (!config.win32 || config.mingw)"
+ ],
+ "output": [ "privateFeature" ]
+ },
+ "geoservices_itemsoverlay": {
+ "label": "Itemsoverlay",
+ "purpose": "Provides access to the itemsoverlay maps",
+ "section": "Location",
+ "output": [ "privateFeature" ]
+ }
+ },
+
+ "summary": [
+ {
+ "section": "Qt Location",
+ "entries": [
+ {
+ "section": "Geoservice plugins",
+ "entries": [
+ "geoservices_osm",
+ "geoservices_here",
+ "geoservices_esri",
+ "geoservices_mapbox",
+ "geoservices_mapboxgl",
+ "geoservices_itemsoverlay"
+ ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/src/plugins/geoservices/geoservices.pro b/src/plugins/geoservices/geoservices.pro
index 07c34798..b81ad34a 100644
--- a/src/plugins/geoservices/geoservices.pro
+++ b/src/plugins/geoservices/geoservices.pro
@@ -1,12 +1,14 @@
TEMPLATE = subdirs
-SUBDIRS = nokia mapbox esri itemsoverlay
+QT_FOR_CONFIG += location-private # pulls in the features defined in configure.json
-qtConfig(concurrent) {
- SUBDIRS += osm
-}
+qtConfig(geoservices_here): SUBDIRS += nokia
+qtConfig(geoservices_mapbox): SUBDIRS += mapbox
+qtConfig(geoservices_esri): SUBDIRS += esri
+qtConfig(geoservices_itemsoverlay): SUBDIRS += itemsoverlay
+qtConfig(geoservices_osm): SUBDIRS += osm
-qtConfig(opengl):qtConfig(c++14):!win32|mingw:!qnx {
+qtConfig(geoservices_mapboxgl) {
!exists(../../3rdparty/mapbox-gl-native/mapbox-gl-native.pro) {
warning("Submodule mapbox-gl-native does not exist. Run 'git submodule update --init' on qtlocation.")
} else {
diff --git a/src/positioning/configure.json b/src/positioning/configure.json
index 22b77be6..49e32be4 100644
--- a/src/positioning/configure.json
+++ b/src/positioning/configure.json
@@ -38,7 +38,7 @@
"summary": [
{
- "section": "Qt Location",
+ "section": "Qt Positioning",
"entries": [
"gypsy",
"winrt_geolocation"