Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
CMake Script to generate Q_IMPORT_PLUGIN to link against static Qt
OlivierLdff last edited by OlivierLdff
Hi I would like to introduce to you a small CMake script a made in order to generate Q_IMPORT_PLUGIN macro when linking with static version of Qt. (For ios for example). This is a native feature of qmake but was missing with CMake build.
This is composed of 2 macros, one to generate the
*_plugin_import.cppand the other to generate
I hope this will help some folks around, feel free to contribuate/test.
Ps: I Hope this is the good place to post.
nice, but if i may drop my input:
you are importing most qml plugins. even when they aren't used. You can use the
qmlimportscannertool (located in the bin dir of the Qt installation) and parse the output. And only include the used plugins. (might require an additional script though)
OlivierLdff last edited by
This is already what I use to generate _qml_plugin_import.cpp so I only import required plugin. I have to admit that the other one _plugin_import.cpp generation il a little bit more brute Force and may break in the future