From 14ef6da10147a60b65de532e191c3a9cd9c368f0 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Thu, 4 Jul 2024 09:59:26 +0200 Subject: [PATCH] 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 --- doc/CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index dc887877646..f5c075cad3b 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -25,8 +25,13 @@ function(_find_all_includes _ret_includes _ret_framework_paths) # framework path if (APPLE) - # 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_type Qt::Core TYPE) + if ("${_qt_type}" STREQUAL "INTERFACE_LIBRARY") + # version-less target Qt::Core is an interface library that links to QtX::Core + 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) # /QtCore.framework/QtCore get_filename_component(_qt_loc "${_qt_target}" DIRECTORY) set("${_ret_framework_paths}" "${_qt_loc}/.." PARENT_SCOPE)