qt5_import_qml_plugins

Overview

 find_package(Qt5QmlImportScanner REQUIRED)
 qt5_import_qml_plugins(<TARGET>)

Description

Runs 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.

Example

 find_package(Qt5 COMPONENTS Quick QmlImportScanner)
 add_executable(myapp main.cpp)
 target_link_libraries(myapp Qt5::Quick)
 qt5_import_qml_plugins(myapp)