From 6f36ee51678fae136aaa1a6ffa8e154b6e224ced Mon Sep 17 00:00:00 2001 From: Alexey Edelev Date: Tue, 26 Sep 2023 19:17:20 +0200 Subject: [PATCH] Resolve symlinks when running headersclean check In some corner-cases the header files are passed by symlink path if the source directory is symlink. Make sure that we resolve symlinks when running headersclean check. Fixes: QTBUG-117518 Pick-to: 6.5 6.6 Change-Id: Ifaffc9186e78fba86037cb50438021466903d210 Reviewed-by: Joerg Bornemann Reviewed-by: Thiago Macieira --- cmake/QtModuleHeadersCheck.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmake/QtModuleHeadersCheck.cmake b/cmake/QtModuleHeadersCheck.cmake index d241f5bb55..39053f3e10 100644 --- a/cmake/QtModuleHeadersCheck.cmake +++ b/cmake/QtModuleHeadersCheck.cmake @@ -11,7 +11,8 @@ if(EXISTS ${HEADER_CHECK_EXCEPTIONS}) file(READ ${HEADER_CHECK_EXCEPTIONS} header_check_exception_list) endif() -file(TO_CMAKE_PATH "${INPUT_HEADER_FILE}" header) +get_filename_component(header "${INPUT_HEADER_FILE}" REALPATH) +file(TO_CMAKE_PATH "${header}" header) foreach(exception IN LISTS header_check_exception_list) file(TO_CMAKE_PATH "${exception}" exception) if(exception STREQUAL header)