diff --git a/cmake/QtFrameworkHelpers.cmake b/cmake/QtFrameworkHelpers.cmake index b0feb2bdb73..33baa18bad3 100644 --- a/cmake/QtFrameworkHelpers.cmake +++ b/cmake/QtFrameworkHelpers.cmake @@ -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}})