find_package(Qt5QmlImportScanner REQUIRED) qt5_import_qml_plugins(<TARGET>)
qmlimportscanner at configure time to find the static QML plugins used and links them to the given target.
Note: When used with a non-static Qt build, this function does nothing.
This CMake command was introduced in Qt 5.14.
find_package(Qt5 COMPONENTS Quick QmlImportScanner) add_executable(myapp main.cpp) target_link_libraries(myapp Qt5::Quick) qt5_import_qml_plugins(myapp)
© 2021 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.