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

Setting QT_NO_CREATE_VERSIONLESS_TARGETS to TRUE breaks dependencies

XMLWordPrintable

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

      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.

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes