cmake qt_add_qml_module and installation
-
Hi everyone ,
I'm confused about the installation part of a qml module with instruction qt_add_qml_module , so if someone could explain it to me , that will be really appreciated. i went through the documentation , but there are still points that i dont get.
in my qt_add_qml_module, i call the function like this :
qt_add_qml_module ( MyQmlModule URI MyNamespace.MyQmlModule OUTPUT_DIRECTORY "MyNamespace/MyQmlModule" VERSION 1.0 SOURCES myType.h myType.cpp QML_FILES MyQmlType.qml )something really basic.
i understand that the function will automatically generate the associated plugin for me (
used for the registration of the types etc.) something called MyQmlModulepluginbut if I use the following instruction :
install(TARGETS MyQmlModule DESTINATION ${CMAKE_INSTALL_PREFIX}/qml)only the MyQmlModule will be install in the directory, but not the plugin nor the qmldir files or any of the other files (generated ones or qml files) .
to install the plugin , i have to explicitly add the plugin target to the install instruction.
can you confirm that I have to that ? and that qt_add_qml_module would not do it automatically for me ?what about the other files ( qmldir file etc. ) ? i know that the qml files and resources will be compiled as bytecodes and embedded into the module dll , but do i have to install those files anyway - as they are generated in the build tree ?
Thank you in advance for any help and clarification that you can provide