Do not use REALPATH when collecting Qt header files

CMake doesn't resolve REALPATH for the non-existing files.
This limitation blocks the use of REALPATH when collecting the
generated module header files. The real path should be resolved
by syncqt implicitly and CMake scripts should rely on ABSOLUTE paths
only, which should be consistent for any files including the generated
files.

Task-number: QTBUG-113295
Pick-to: 6.5
Change-Id: I0219c7bf34ef6a6589c6d5fade4c2ed3f8036ef0
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
This commit is contained in:
Alexey Edelev 2023-05-02 16:39:31 +02:00
parent 0d3fb82535
commit b523a655c8

View File

@ -1209,7 +1209,6 @@ function(qt_internal_collect_module_headers out_var target)
get_target_property(source_dir ${target} SOURCE_DIR)
endif()
get_filename_component(source_dir "${source_dir}" ABSOLUTE)
get_filename_component(source_dir "${source_dir}" REALPATH)
get_target_property(is_3rdparty_library ${target} _qt_module_is_3rdparty_header_library)
@ -1230,7 +1229,6 @@ function(qt_internal_collect_module_headers out_var target)
endif()
get_filename_component(file_path "${file_path}" ABSOLUTE)
get_filename_component(file_path "${file_path}" REALPATH)
string(FIND "${file_path}" "${source_dir}" source_dir_pos)
if(source_dir_pos EQUAL 0)