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

add_library cannot create target "CustomControls" because another target with the same name already exists

    XMLWordPrintable

Details

    • 8ce518b89 (dev), 0a06dac2f (6.5.2), 75c53b9ac (6.6), 752baa5b0 (6.5), fcfcd657f (dev), 226cd4aab (6.5.2), c85b69e14 (6.5), ce7bd7073 (6.6)

    Description

      CMake Error at qtbase/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:2355 (add_library):
      add_library cannot create target "CustomControls" because another target
      with the same name already exists.  The existing target is a static library
      created in source directory
      "/home/qt/work/qt/qt5/qtdoc/examples/demos/todolist/imports/CustomControls".
      See documentation for policy CMP0002 for more details.
      agent:2023/06/21 06:03:55 build.go:402: Call Stack (most recent call first):
      qtbase/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:2281 (_qt_internal_add_library)
      qtbase/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:2377 (qt6_add_library)
      qtdoc/examples/demos/thermostat/imports/CustomControls/CMakeLists.txt:4 (qt_add_library)
      agent:2023/06/21 06:03:55 build.go:402: CMake Error at qtbase/lib/cmake/Qt6Qml/Qt6QmlMacros.cmake:2489 (message):
      Target CustomControls already has a qmltypes file set.
      agent:2023/06/21 06:03:55 build.go:402: Call Stack (most recent call first):
      qtbase/lib/cmake/Qt6Qml/Qt6QmlMacros.cmake:540 (_qt_internal_qml_type_registration)
      qtbase/lib/cmake/Qt6Qml/Qt6QmlMacros.cmake:716 (qt6_add_qml_module)
      qtdoc/examples/demos/thermostat/imports/CustomControls/CMakeLists.txt:5 (qt_add_qml_module)
      -- Configuring incomplete, errors occurred!
      

      Build log: https://testresults.qt.io/logs/qt/qt5/af285f452510d63dd0fec8bde865e07ecaeb8b51/LinuxUbuntu_22_04x86_64LinuxUbuntu_22_04x86_64GCCqtci-linux-Ubuntu-22.04-x86_64-51-dab276Documentation_Sccache_TestDocs_UseConfigure/e0136d79302259f207170c44866dd540f95ca04b/build_1692383064/log.txt.gz

      Details: https://testresults.qt.io/coin/integration/qt/qt5/tasks/1692383053

      Tested changes (refs/builds/qtci/dev/1687327000):
      https://codereview.qt-project.org/c/qt/qt5/+/486721/2 Update submodules on 'dev in qt/qt5'

      Attachments

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

        Activity

          People

            docteam Qt Documentation Team
            janihe Jani Heikkinen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: