Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.9
-
None
-
-
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 |
629669,2 | CMake: Fix -no-prefix build with CMake < 3.26 on macOS | dev | qt/qtbase | Status: MERGED | +2 | 0 |