Fix developer documentation build with Qt >= 6.8 on macOS

Before Qt 6.8, the versionnumber-less targets of Qt were interface
libraries that linked to the actual versioned Qt target. Since then,
they are actual targets in their own right, so the code that determined
the header location for Qt on macOS failed.

Change-Id: Icb2d2fcb075b9b4c2808d7edc0a7ec3fb7be49f7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Eike Ziller
2024-07-04 09:59:26 +02:00
parent dc2af02fa0
commit 14ef6da101

View File

@@ -25,8 +25,13 @@ function(_find_all_includes _ret_includes _ret_framework_paths)
# framework path # framework path
if (APPLE) if (APPLE)
get_target_property(_qt_type Qt::Core TYPE)
if ("${_qt_type}" STREQUAL "INTERFACE_LIBRARY")
# version-less target Qt::Core is an interface library that links to QtX::Core # version-less target Qt::Core is an interface library that links to QtX::Core
get_target_property(_qt_core Qt::Core INTERFACE_LINK_LIBRARIES) get_target_property(_qt_core Qt::Core INTERFACE_LINK_LIBRARIES)
else()
set(_qt_core "Qt::Core")
endif()
get_target_property(_qt_target ${_qt_core} LOCATION) # <fw_path>/QtCore.framework/QtCore get_target_property(_qt_target ${_qt_core} LOCATION) # <fw_path>/QtCore.framework/QtCore
get_filename_component(_qt_loc "${_qt_target}" DIRECTORY) get_filename_component(_qt_loc "${_qt_target}" DIRECTORY)
set("${_ret_framework_paths}" "${_qt_loc}/.." PARENT_SCOPE) set("${_ret_framework_paths}" "${_qt_loc}/.." PARENT_SCOPE)