I'm trying to build an static qt app with qml, but the qt_import_qml_plugins macro doesnt import libs from qt qml folder - thus leading to plugin not found errors.
QQmlApplicationEngine failed to load component qrc:/Launcher/src/view/Launcher.qml:1:1: module "QtQuick" plugin "qtquick2plugin" not found
Logs
Click to expand log
```
[Put your log output here](qt.core.plugin.factoryloader: ignoring "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3" since plugins are disabled in static builds qt.core.plugin.factoryloader: ignoring "org.qt-project.Qt.QPA.QPlatformThemeFactoryInterface.5.1" since plugins are disabled in static builds qt.core.plugin.factoryloader: ignoring "org.qt-project.Qt.QIconEngineFactoryInterface" since plugins are disabled in static builds qt.core.plugin.factoryloader: ignoring "org.qt-project.Qt.QImageIOHandlerFactoryInterface" since plugins are disabled in static builds qt.qml.import: addImportPath: "C:/.conan/6f0042/1/res/archdatadir/qml" qt.qml.import: addImportPath: "qrc:/qt-project.org/imports" qt.qml.import: addImportPath: "C:/Development/GDOAgain!/launcher_priv/build/Release" qt.qml.import: addLibraryImport: qrc:/Launcher/src/view/Launcher.qml "QtQuick" version ' invalid ' as "" qt.qml.import: importExtension: qrc:/Launcher/src/view/Launcher.qml loaded "C:/.conan/6f0042/1/res/archdatadir/qml/QtQuick/qmldir" qt.qml.import: resolvePlugin Could not resolve dynamic plugin with base name "qtquick2plugin" in "C:/.conan/6f0042/1/res/archdatadir/qml/QtQuick" file does not exist qt.qml.import: locateLocalQmldir: QtQuick module's qmldir found at "C:/.conan/6f0042/1/res/archdatadir/qml/QtQuick/qmldir" QQmlApplicationEngine failed to load component qrc:/Launcher/src/view/Launcher.qml:1:1: module "QtQuick" plugin "qtquick2plugin" not found qt.core.plugin.factoryloader: ignoring "org.qt-project.Qt.QAccessibleBridgeFactoryInterface" since plugins are disabled in static builds)
```
Description
I'm trying to build an static qt app with qml, but the
qt_import_qml_plugins
macro doesnt import libs from qt qml folder - thus leading to plugin not found errors.Package and Environment Details
Conan profile
[settings] os=Windows os_build=Windows arch=x86_64 arch_build=x86_64 compiler=Visual Studio compiler.version=17 build_type=Release [options] [conf] [build_requires] [env]
Steps to reproduce
Using the follow conan recipe:
and the following CMakeLists:
Compiles fine but when running binary leads to:
Logs
Click to expand log
``` [Put your log output here](qt.core.plugin.factoryloader: ignoring "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3" since plugins are disabled in static builds qt.core.plugin.factoryloader: ignoring "org.qt-project.Qt.QPA.QPlatformThemeFactoryInterface.5.1" since plugins are disabled in static builds qt.core.plugin.factoryloader: ignoring "org.qt-project.Qt.QIconEngineFactoryInterface" since plugins are disabled in static builds qt.core.plugin.factoryloader: ignoring "org.qt-project.Qt.QImageIOHandlerFactoryInterface" since plugins are disabled in static builds qt.qml.import: addImportPath: "C:/.conan/6f0042/1/res/archdatadir/qml" qt.qml.import: addImportPath: "qrc:/qt-project.org/imports" qt.qml.import: addImportPath: "C:/Development/GDOAgain!/launcher_priv/build/Release" qt.qml.import: addLibraryImport: qrc:/Launcher/src/view/Launcher.qml "QtQuick" version ' invalid ' as "" qt.qml.import: importExtension: qrc:/Launcher/src/view/Launcher.qml loaded "C:/.conan/6f0042/1/res/archdatadir/qml/QtQuick/qmldir" qt.qml.import: resolvePlugin Could not resolve dynamic plugin with base name "qtquick2plugin" in "C:/.conan/6f0042/1/res/archdatadir/qml/QtQuick" file does not exist qt.qml.import: locateLocalQmldir: QtQuick module's qmldir found at "C:/.conan/6f0042/1/res/archdatadir/qml/QtQuick/qmldir" QQmlApplicationEngine failed to load component qrc:/Launcher/src/view/Launcher.qml:1:1: module "QtQuick" plugin "qtquick2plugin" not found qt.core.plugin.factoryloader: ignoring "org.qt-project.Qt.QAccessibleBridgeFactoryInterface" since plugins are disabled in static builds) ```