Skip to content

Commit 76b6d27

Browse files
committedNov 24, 2017
Use supported way to create a plugin
Reading through the qmake documentation you aren't supposed to just load(qt_plugin) - and as a matter of fact this fails for certain situations on Mac. Using the right TEMPLATE and CONFIG seems to fix the problem. Signed-off-by: Dirk Hohndel <[email protected]>
1 parent 1b857c0 commit 76b6d27

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed
 

‎googlemaps.pro

+9-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
1+
TEMPLATE = lib
2+
CONFIG += plugin
3+
CONFIG += relative_qt_rpath # Qt's plugins should be relocatable
14
TARGET = qtgeoservices_googlemaps
5+
PLUGIN_TYPE = geoservices
6+
PLUGIN_CLASS_NAME = QGeoServiceProviderFactoryGooglemaps
7+
target.path = $$[QT_INSTALL_PLUGINS]/$$PLUGIN_TYPE
8+
INSTALLS += target
9+
TARGET = $$qt5LibraryTarget($$TARGET)
10+
211

312
qtHaveModule(location-private) {
413
QT += location-private
@@ -13,10 +22,6 @@ qtHaveModule(positioning-private) {
1322
QT += network
1423
INCLUDEPATH += ../ ./
1524

16-
PLUGIN_TYPE = geoservices
17-
PLUGIN_CLASS_NAME = QGeoServiceProviderFactoryGooglemaps
18-
load(qt_plugin)
19-
2025
HEADERS += \
2126
qgeoserviceproviderplugingooglemaps.h \
2227
qgeocodingmanagerenginegooglemaps.h \

0 commit comments

Comments
 (0)
Please sign in to comment.