Details
-
Bug
-
Resolution: Invalid
-
P2: Important
-
None
-
6.1.0 Alpha
-
None
Description
The qt6_target_qml_files() command uses file(COPY) to copy the specified qml files to the OUTPUT_DIRECTORY given in an earlier call to qt6_add_qml_module() for the same target. If the user subsequently edits the qml file, it won't be re-copied to the OUTPUT_DIRECTORY until cmake is re-run. There are at least two ways this could be addressed:
- Use configure_file() instead, but this then forces an entire cmake reconfigure step just to copy the changed qml files. This would be very frustrating for developers actively working on the qml files.
- Use a build rule so that the copy happens at build time. Something would need to depend on the copied file for this to work, or the copy would have to be a POST_BUILD custom command rule added to the target. The latter is the approach generally used elsewhere and is probably the right solution in this case.
Attachments
Issue Links
- relates to
-
QTBUG-94164 Generate a complete module when invoking qt6_add_qml_module with applications
- Closed