cmake: Don't create framework header directories unless we have headers

qt_copy_framework_headers was unconditionally creating all the private,
qpa, rhi, and ssg header subdirectories, even if we didn't have any
headers to put in them, which doesn't match how we structure the
normal include directories.

Pick-to: 6.10 6.9 6.8
Change-Id: I9efe2fd9c4f6d10f57e30ffcba2b912dae35a2c4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Tor Arne Vestbø 2025-09-11 12:14:17 +02:00
parent 13c4f7c5ff
commit c4f8fa83db
1 changed files with 1 additions and 1 deletions

View File

@ -103,7 +103,6 @@ function(qt_copy_framework_headers target)
foreach(type IN ITEMS PUBLIC PRIVATE QPA RHI SSG)
set(in_files_${type} "")
set(fw_output_header_dir "${output_dir_${type}}")
list(APPEND out_dirs "${fw_output_header_dir}")
foreach(hdr IN LISTS arg_${type})
get_filename_component(in_file_path ${hdr} ABSOLUTE)
get_filename_component(in_file_name ${hdr} NAME)
@ -112,6 +111,7 @@ function(qt_copy_framework_headers target)
list(APPEND in_files_${type} "${in_file_path}")
endforeach()
if(in_files_${type})
list(APPEND out_dirs "${fw_output_header_dir}")
list(APPEND copy_commands
COMMAND ${CMAKE_COMMAND} -E copy ${in_files_${type}} "${fw_output_header_dir}")
list(APPEND in_files ${in_files_${type}})