From 3856f0185442b5c4b85c770888072db0bc3fff1a Mon Sep 17 00:00:00 2001 From: Paolo Angelelli Date: Tue, 15 Aug 2017 13:21:48 +0200 Subject: 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 --- configure.json | 3 +- src/location/configure.json | 70 +++++++++++++++++++++++++++++++++ src/plugins/geoservices/geoservices.pro | 12 +++--- src/positioning/configure.json | 2 +- 4 files changed, 80 insertions(+), 7 deletions(-) create mode 100644 src/location/configure.json 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" -- cgit v1.2.1