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

add_library cannot create imported target

XMLWordPrintable

      Trying to cross-compile cmake projects with Boot2Qt toolchain leads to errors from QML plugin cmake files:

      cmake -DCMAKE_TOOLCHAIN_FILE=/home/sapiippo/Qt/5.15.0/Boot2Qt/jetson-tx2/toolchain/sysroots/x86_64-pokysdk-linux/usr/share/cmake/OEToolchainConfig.cmake
      
      CMake Error at /home/sapiippo/Qt/5.15.0/Boot2Qt/jetson-tx2/toolchain/sysroots/aarch64-poky-linux/usr/lib/cmake/Qt5Qml/Qt5Qml_QDebugMessageServiceFactory.cmake:2 (add_library):
        add_library cannot create imported target
        "Qt5::QDebugMessageServiceFactory" because another target with the same
        name already exists.
      Call Stack (most recent call first):
        /home/sapiippo/Qt/5.15.0/Boot2Qt/jetson-tx2/toolchain/sysroots/aarch64-poky-linux/usr/lib/cmake/Qt5Qml/Qt5QmlConfigExtras.cmake:4 (include)
        /home/sapiippo/Qt/5.15.0/Boot2Qt/jetson-tx2/toolchain/sysroots/aarch64-poky-linux/usr/lib/cmake/Qt5Qml/Qt5QmlConfig.cmake:257 (include)
        /home/sapiippo/Qt/5.15.0/Boot2Qt/jetson-tx2/toolchain/sysroots/aarch64-poky-linux/usr/lib/cmake/Qt5QmlModels/Qt5QmlModelsConfig.cmake:116 (find_package)
        /home/sapiippo/Qt/5.15.0/Boot2Qt/jetson-tx2/toolchain/sysroots/aarch64-poky-linux/usr/lib/cmake/Qt5Quick/Qt5QuickConfig.cmake:116 (find_package)
        /home/sapiippo/Qt/5.15.0/Boot2Qt/jetson-tx2/toolchain/sysroots/aarch64-poky-linux/usr/lib/cmake/Qt5/Qt5Config.cmake:33 (find_package)
        CMakeLists.txt:27 (find_package)
       

      This happens after fix done for QTBUG-58812 and can be then workaround using QT5_STRICT_PLUGIN_GLOB

       

       

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

            kkohne Kai Köhne
            sapiippo Samuli Piippo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes