ECMFindQmlModuleΒΆ
Find QML import modules through a find_qmlmodule()
call.
It looks for the qmldir and uses the qmlplugindump if needed application to find the plugins and sets them up as
runtime dependencies.
This is useful so that when we configure a project we are notified when some
QML imports are not present in the system.
ecm_find_qmlmodule(<module_name>
<version> # Optional for Qt6 builds
[REQUIRED] # Since 6.0
)
Usage example:
ecm_find_qmlmodule(org.kde.kirigami 2.1)
ecm_find_qmlmodule(org.kde.kirigami 2.1 REQUIRED) # CMake will fail if the required version is not found
ecm_find_qmlmodule(org.kde.kirigami) # Find it without a given version
ecm_find_qmlmodule(org.kde.kirigami REQUIRED) # CMake will fail if it is not found
Since 5.38.0.