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

qt_import_plugins(target INCLUDE_BY_TYPE type) doesn't have any effect

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P2: Important
    • None
    • 6.8.2
    • Build System: CMake
    • None
    • All

    Description

      How to reproduce

      Use a static desktop build of Qt.
      Take a Qt example that doesn't use Qt::PrintSupport.
      I've used the easing widgets example.

      Add PrintSupport to the find_package call:

      find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets PrintSupport)
      

      After creating the target executable, add the following:

      qt_import_plugins(easing INCLUDE Qt6::QCupsPrinterSupportPlugin)
      

      Configure the project with CMake and inspect the build.ninja file:

      $ rg /plugins/printsupport < build.ninja
      .../qtbase/plugins/printsupport/libcupsprintersupport.a
      ...
      

      OK, this is fine. The plugin is linked.

      Now, replace the qt_import_plugins call with

      qt_import_plugins(easing INCLUDE_BY_TYPE printsupport)
      

      and inspect build.ninja again.

      Outcome: We don't link against libcupsprintersupport.a but we should.

      Attachments

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

        Activity

          People

            jbornema Joerg Bornemann
            jbornema Joerg Bornemann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes