I have a QML plugin compiled (to a .so) by another project. I want to re-use this in my own QML application without re-building it each time. I want to copy the .so over and, with minimal additional code, be able to write:
import QQuickMapboxGL 1.0
at the top of my QML files and have it work.
Where do I need to copy the .so in my QML project, and how do I need to add it to the project so that the QML runtime can find it?
What I've tried:
- Create a
QQuickMapboxGLdirectory withlibqmapboxgl.soin it. Create a
qmldirfile in that directory with the contents:plugin qmapboxglAdd the following to my
.profile:INSTALL_DIR = $$PWD/../install target.path = $$INSTALL_DIR # Copy the QQuickMapboxGL folder to the install directory plugin.files = QQuickMapboxGL/* plugin.path = $$INSTALL_DIR/QQuickMapboxGL INSTALLS += target pluginAdd a
make installbuild step.
The result of this mad hackery was:
plugin cannot be loaded for module "QQuickMapboxGL": Plugin verification data mismatch in '/my/build/QQuickMapboxGL/libqmapboxgl.so'
I have verified that the plugin and my application are both being compiled with the same version of g++ (g++-5 (Ubuntu 5.4.1-2ubuntu1~14.04) 5.4.1 20160904) and the same Qt download (5.7.0).
QQuickMapboxGLfrom here. - Phrogz