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

qt_internal_add_qml_module: Using NO_PLUGIN leads to broken Target.cmake file on Windows

    XMLWordPrintable

Details

    • Task
    • Resolution: Cannot Reproduce
    • P2: Important
    • 6.6
    • None
    • Build System: CMake
    • Windows

    Description

      For some reason when adding an internal QML module and specifying NO_PLUGIN. We end up with a broken Target.cmake file:

       

      agent:2022/08/03 15:53:44 build.go:394: CMake Error at C:/Users/qt/work/install/lib/cmake/Qt6QmlMeta/Qt6QmlMetaTargets.cmake:109 (message):
      agent:2022/08/03 15:53:44 build.go:394:   The imported target "Qt6::QmlMeta" references the file
      agent:2022/08/03 15:53:44 build.go:394:      "C:/Users/qt/work/install/lib/Qt6QmlMetad.lib"
      agent:2022/08/03 15:53:44 build.go:394:   but this file does not exist.  Possible reasons include:
      agent:2022/08/03 15:53:44 build.go:394:   * The file was deleted, renamed, or moved to another location.
      agent:2022/08/03 15:53:44 build.go:394:   * An install or uninstall procedure did not complete successfully.
      agent:2022/08/03 15:53:44 build.go:394:   * The installation package was faulty and contained
      agent:2022/08/03 15:53:44 build.go:394:      "C:/Users/qt/work/install/lib/cmake/Qt6QmlMeta/Qt6QmlMetaTargets.cmake"
      agent:2022/08/03 15:53:44 build.go:394:   but not all the files it references.
      agent:2022/08/03 15:53:44 build.go:394: Call Stack (most recent call first):
      agent:2022/08/03 15:53:44 build.go:394:   C:/Users/qt/work/install/lib/cmake/Qt6QmlMeta/Qt6QmlMetaConfig.cmake:52 (include)
      agent:2022/08/03 15:53:44 build.go:394:   C:/Users/qt/work/install/lib/cmake/Qt6/Qt6Config.cmake:211 (find_package)
      agent:2022/08/03 15:53:44 build.go:394:   /Users/qt/work/install/lib/cmake/Qt6BuildInternals/StandaloneTests/QtDeclarativeTestsConfig.cmake:4 (find_package)
      agent:2022/08/03 15:53:44 build.go:394:   C:/Users/qt/work/install/lib/cmake/Qt6BuildInternals/Qt6BuildInternalsConfig.cmake:619 (include)
      agent:2022/08/03 15:53:44 build.go:394:   tests/CMakeLists.txt:10 (qt_build_tests)

      Here's a small example:

      qt_internal_add_qml_module(QmlMeta
          URI "QtQml"
          VERSION "${PROJECT_VERSION}"
          DESIGNER_SUPPORTED
          NO_GENERATE_QMLTYPES
          NO_SYNC_QT
          NO_PLUGIN 
          IMPORTS
              QtQml.Base/auto
              ${module_dynamic_qml_imports}
      )
      

       

      Attachments

        Issue Links

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

          Activity

            People

              qtbuildsystem Qt Build System Team
              max.goldstein Maximilian Goldstein
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes