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

Using a -no-prefix macOS Qt that was built with CMake 3.24 is not possible

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.10.0 FF
    • 6.9
    • Build System: CMake
    • None
    • macOS
    • 9df20860d (dev)

    Description

      Configure Qt with

      qtbase/configure -no-prefix
      

      using CMake 3.24 on macOS.

      Trying to configure any user project that has find_package(Qt6 COMPONENTS Core) results in:

      Make Warning at /Users/alex/Dev/qt/builds/dev-mac-2/qtbase/lib/cmake/Qt6/Qt6Config.cmake:229 (find_package):
        Found package configuration file:
      
          /Users/alex/Dev/qt/builds/dev-mac-2/qtbase/lib/cmake/Qt6Core/Qt6CoreConfig.cmake
      
        but it set Qt6Core_FOUND to FALSE so package "Qt6Core" is considered to be
        NOT FOUND.  Reason given by package:
      
        The following imported targets are referenced, but are missing:
        Qt6::CorePrivate
      
      Call Stack (most recent call first):
        CMakeLists.txt:8 (find_package)
      
      
      CMake Error at CMakeLists.txt:8 (find_package):
        Found package configuration file:
      
          /Users/alex/Dev/qt/builds/dev-mac-2/qtbase/lib/cmake/Qt6/Qt6Config.cmake
      
        but it set Qt6_FOUND to FALSE so package "Qt6" is considered to be NOT
        FOUND.  Reason given by package:
      
        Failed to find required Qt component "Core".
      
        Expected Config file at
        "/Users/alex/Dev/qt/builds/dev-mac-2/qtbase/lib/cmake/Qt6Core/Qt6CoreConfig.cmake"
        exists
      

      This is due to using BUILD_INTERFACE here https://codereview.qt-project.org/c/qt/qtbase/+/615004/16/cmake/QtTargetHelpers.cmake#355

      This is due to QDarwinBluetoothPermissionPlugin having INTERFACE_LINK_LIBRARIES $<LINK_ONLY:Qt6::CorePrivate> in its exported property, and CorePrivate is not looked up by default in a user project. All darwin permission plugins link to CorePrivate due to usage of private headers.

      Attachments

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

        Activity

          People

            jbornema Joerg Bornemann
            alexandru.croitor Alexandru Croitor
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes