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

Using qt_add_plugin outside an internal Qt build errors out

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • None
    • 6.0.0 Beta1, 6.0.0
    • Build System: CMake

    Description

      25/10/2020 the problem still exists in Beta1
      Make Error at /home/anna/Qt/6.0.0/gcc_64/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:1285 (qt_internal_add_plugin):
      Unknown CMake command "qt_internal_add_plugin".
      Call Stack (most recent call first):
      plugin/CMakeLists.txt:22 (qt_add_plugin)

      Tested on:
      Description: Ubuntu 18.04.4 LTS
      Release: 18.04
      Codename: bionic

      cmake version 3.10.2
      g++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
      Qt from online installer.

      ==============================================

      When using qt_add_plugin in a cmake project outside of Qt it will error out with the following:

      CMake Error at D:/path/to/qtbase/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:1280 (qt_internal_add_plugin):  Unknown CMake command "qt_internal_add_plugin".
      Call Stack (most recent call first):  src/CMakeLists.txt:9 (qt_add_plugin)
      

      Following the logic of the if-statement at that location it can be worked around by either calling qt6_add_plugin directly or by setting 
      "QT_DISABLE_QT_ADD_PLUGIN_COMPATIBILITY" to TRUE.

      Attachments

        Issue Links

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

          Activity

            People

              alexandru.croitor Alexandru Croitor
              manordheim MĂ„rten Nordheim
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes