From eaa40953af2caafd1d81c80ec472e4fb7c7dff96 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Thu, 4 Jul 2024 11:45:28 +0200 Subject: [PATCH] Fix framework path for developer documentation build on macOS At some point the LOCATION target property of Qt::Core must have changed from /QtCore.framework/QtCore to /QtCore.framework/Versions/A/QtCore which broke the code that tried to infer the `fw_path` from it. Instead of constructing a relative path from the LOCATION, just cut off the `/QtCore.framework/` and anything after it. Change-Id: Ieed8ade6318c602d9cb4ff9685a084e4f8194086 Reviewed-by: Christian Stenger --- doc/CMakeLists.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index f5c075cad3b..1100fc0733a 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -32,9 +32,12 @@ function(_find_all_includes _ret_includes _ret_framework_paths) 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) + get_target_property(_qt_target ${_qt_core} LOCATION) + # eg /QtCore.framework/QtCore + # or /QtCore.framework/Versions/A/QtCore + # cut off /QtCore.framework/* + string(REGEX REPLACE "/QtCore.framework/.*" "" _qt_loc "${_qt_target}") + set("${_ret_framework_paths}" "${_qt_loc}" PARENT_SCOPE) endif() endfunction()