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

Configuring an executable with an attached qml module fails when using the Xcode generator

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • None
    • 6.2.0 Beta2
    • Build System: CMake
    • None
    • Xcode 12.4
    • iOS/tvOS/watchOS, macOS

    Description

      A sample cmake project with an executable and a qml module can be found in a qtdeclarative test.

      After removing the version from the find_package call to avoid an unrelated error, it fails as shown below:

      $ qt-cmake ../../../worktrees/dev/qtdeclarative/tests/auto/cmake/qtquickcompiler -GXcode
      
      -- Configuring done
      -- Generating done
      CMake Error in CMakeLists.txt:
        The custom command generating
      
          /Volumes/T3/Dev/qt/qt5_cmake/builds/dev-ios-simulator-super/qmltestapp_cmake/meta_types/qt6qqc_test_metatypes.json.gen
      
        is attached to multiple targets:
      
          qqc_test
          qqc_test_qmltyperegistration
      
        but none of these is a common dependency of the other(s).  This is not
        allowed by the Xcode "new build system".
      

      After a few reconfigurations it fails with a different referenced file.

      CMake Error in CMakeLists.txt:
        The custom command generating
      
          /Volumes/T3/Dev/qt/qt5_cmake/builds/dev-ios-simulator-super/qmltestapp_cmake/qqc_test_qmltyperegistrations.cpp
      
        is attached to multiple targets:
      
          qqc_test
          qqc_test_qmltyperegistration
      
        but none of these is a common dependency of the other(s).  This is not
        allowed by the Xcode "new build system".
      

      It only fails with the Xcode generator. It configures find with Ninja, but of course the app is not launchable anymore.

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-95763
          # Subject Branch Project Status CR V

          Activity

            People

              qtbuildsystem Qt Build System Team
              alexandru.croitor Alexandru Croitor
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: