Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-91470

qt6_target_qml_files() doesn't re-copy changed qml files to OUTPUT_DIRECTORY

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P2: Important
    • None
    • 6.1.0 Alpha
    • Build System: CMake
    • None
    • All

    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

          Activity

            People

              qtbuildsystem Qt Build System Team
              crscott Craig Scott
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: