Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-29294

CMake project file management: Produce cleaner code for qt_add_qml_module()

XMLWordPrintable

      See the example below (taken from https://www.qt.io/blog/qt-creator-11-cmake-update )

       

      After adding a *.qml file...
      Actual outcome:

      qt_add_qml_module(appQuickApp
          URI QuickApp
          VERSION 1.0
          QML_FILES Main.qml
          QML_FILES Item.qml
      )
      

       

      Expected outcome:

      qt_add_qml_module(appQuickApp
          URI QuickApp
          VERSION 1.0
          QML_FILES Main.qml Item.qml
      )
      
      # OR...
      
      qt_add_qml_module(appQuickApp
          URI QuickApp
          VERSION 1.0
          QML_FILES
              Main.qml
              Item.qml
      )
      
      # OR some other arrangement that doesn't duplicate `QML_FILES`

       

      After removing all *.qml files...

      Actual outcome:

      qt_add_qml_module(appQuickApp
          URI QuickApp
          VERSION 1.0
          QML_FILES
          QML_FILES
      )
      

       

      Expected outcome:

      qt_add_qml_module(appQuickApp
          URI QuickApp
          VERSION 1.0
      )
      

       

      Notes
      Similar issues occur with the SOURCES field for qt_add_qml_module()

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            cadam Cristian Adam
            skoh-qt Sze Howe Koh
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes