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

Make QT5_ADD_RESOURCES usable with build time generated qrc file

    XMLWordPrintable

Details

    Description

      I'd like to create the qrc file on the fly during the build process. (e.g. with all qml files which are in one directory)

      I use a shell script to compose the qrc file and leave it untouched if nothing has changed. Since the command has no file dependencies I have to use add_custom_target for the execution of that script. (add_custom_command would work dependency-wise, but would not be executed every build run unless I'd add a bogus dependency to some file which changes every time e.g. /proc/cpuinfo)

      In order to be executed before the call of rcc it would be necessary to add a DEPENDS option to the function. Therefore i suggest the attached path.

      But there is still a problem if one file from that folder got deleted: There would be an Make-error because on dependency to the rcc call would be missing. Then the next make call would work like a charm, because the qrc file was updated the last time (just before the error was produced))

      Attachments

        1. Qt5CoreMacros.cmake.patch
          0.9 kB
        2. CMakeLists.txt
          0.4 kB
        3. createQtResource.sh
          0.7 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            krf Kevin Funk
            richardo Richard Öhlinger
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes