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

qt6_qml_type_registration with VS19 cmake generator outputs error: "The dependency target "qt6-test_autogen" of target"qt6-test_automoc_json_extraction" does not exist.

    XMLWordPrintable

Details

    • Windows
    • 785df612319d3023ad994f3153d42a067a1adaa9 (qt/qtbase/dev) 6368c3fe3202d7193588b381b1a14ceb43bbbf48 (qt/qtbase/6.2)

    Description

      Error occurs when "qt6_qml_type_registration" is used with VS19 cmake generator. This can be reproduced with the example qml/referenceexamples/adding .

      No errors occur if ninja is used instead. The same project builds fine with 6.1.1 even with VS19 generator.

      Cmake output:

      Running C:\Program Files\CMake\bin\cmake.exe -S C:/Qt/Examples/Qt-6.2.0/qml/referenceexamples/adding -B C:/Qt/Examples/Qt-6.2.0/qml/referenceexamples/adding/build_vs in C:\Qt\Examples\Qt-6.2.0\qml\referenceexamples\adding\build_vs.
      – Configuring done
      CMake Error at C:/Qt/6.2.0/msvc2019_64/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:1028 (add_dependencies):
      The dependency target "adding_autogen" of target
      "adding_automoc_json_extraction" does not exist.
      Call Stack (most recent call first):
      C:/Qt/6.2.0/msvc2019_64/lib/cmake/Qt6Qml/Qt6QmlMacros.cmake:1450 (qt6_extract_metatypes)
      CMakeLists.txt:58 (qt6_qml_type_registration)

      Attachments

        Activity

          People

            alexandru.croitor Alexandru Croitor
            miikapernu Miika Pernu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: