diff options
author | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2017-02-24 18:09:59 +0200 |
---|---|---|
committer | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2017-02-24 17:27:47 +0000 |
commit | c3044ed7e4c6ab46cbd184f2c786699c509094e2 (patch) | |
tree | 620c264d3d21c12e40df363e39d1596c82600866 /src/plugins/geoservices/geoservices.pro | |
parent | c54ee74acdb9757989004005baf79e99be4c9417 (diff) | |
download | qtlocation-c3044ed7e4c6ab46cbd184f2c786699c509094e2.tar.gz |
Warn when mapbox-gl-native submodule is not present
If the mapboxgl plugin can be built (i.e. compiler support, opengl, etc
is in place), fail the build if the submodule is not checked in and
print a message on how to fix it.
If the plugin is not supported, ignore it completely.
Task-number: QTBUG-58939
Change-Id: I7fc05567921cd31fc26fa540ba5806f676e015fb
Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
Diffstat (limited to 'src/plugins/geoservices/geoservices.pro')
-rw-r--r-- | src/plugins/geoservices/geoservices.pro | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/src/plugins/geoservices/geoservices.pro b/src/plugins/geoservices/geoservices.pro index 0c2a799e..6de37641 100644 --- a/src/plugins/geoservices/geoservices.pro +++ b/src/plugins/geoservices/geoservices.pro @@ -2,20 +2,32 @@ TEMPLATE = subdirs SUBDIRS = nokia osm mapbox esri -qtHaveModule(opengl) { - linux|android: { +defineTest(supportsMapboxGL) { + !qtHaveModule(opengl) { + return(false) + } + + linux|android { equals(QT_GCC_MAJOR_VERSION, 4): greaterThan(QT_GCC_MINOR_VERSION, 8) { - SUBDIRS += mapboxgl ../../3rdparty/mapbox-gl-native - mapboxgl.depends = ../../3rdparty/mapbox-gl-native + return(true) } greaterThan(QT_GCC_MAJOR_VERSION, 4) { - SUBDIRS += mapboxgl ../../3rdparty/mapbox-gl-native - mapboxgl.depends = ../../3rdparty/mapbox-gl-native + return(true) } } - ios|macos: { + ios|macos { + return(true) + } + + return(false) +} + +supportsMapboxGL() { + !exists(../../3rdparty/mapbox-gl-native) { + error("Submodule mapbox-gl-native does not exist. Run 'git submodule update --init' on qtlocation.") + } else { SUBDIRS += mapboxgl ../../3rdparty/mapbox-gl-native mapboxgl.depends = ../../3rdparty/mapbox-gl-native } |