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

Setting QT_NO_CREATE_VERSIONLESS_TARGETS to TRUE breaks dependencies

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 6.5.2
    • Build System: CMake
    • None

    Description

      Before the find_package-call I used set(QT_NO_CREATE_VERSIONLESS_TARGETS TRUE). Then I created a library target which then links to Qt6::WebEngineWidgets. This then breaks the build with

      The link interface of target "Qt6::WebEngineCore" contains:

          Qt::Core

        but the target was not found.  Possible reasons include:

          * There is a typo in the target name.
          * A find_package call is missing for an IMPORTED target.
          * An ALIAS target is missing.

       

      b/c Qt6WebEngineCoreTargets.cmake uses the unversioned targets in its INTERFACE_LINK_LIBRARIES:

      INTERFACE_LINK_LIBRARIES "Qt::Core;Qt::Gui;Qt::Network;Qt::Quick;Qt::WebChannel;Qt::Positioning"

       

      Manually patching the file reveals other targets with the same problem. So as it is right now, the switch cannot function as intended.

      Attachments

        Issue Links

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

          Activity

            People

              qtbuildsystem Qt Build System Team
              jb_sse Jürgen Bill
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes