Don't create ${target}_qml_files target any more

The qml files should now always be added via dedicated functions
provided by the qtdeclarative repo. Those functions take care of adding
the files to targets so that they will show up in IDE file lists, so we
should not add them to a separate target as well. This will also remove
one unnecessary build target, which will reduce visual noise in some
IDEs.

Pick-to: 6.2
Change-Id: I79bf1ea8fb8a2f15643e052d50ac582a91bdff1a
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Craig Scott 2021-07-12 21:38:42 +10:00
parent 93fdd88a42
commit a1229a5aa1

View File

@ -1576,15 +1576,10 @@ function(__qt_propagate_generated_resource target resource_name generated_source
endfunction()
# Creates fake targets and adds resource files to IDE's tree
# FIXME: We shouldn't need to create a separate target for this, the files
# should be added to the actual target instead.
function(_qt_internal_expose_source_file_to_ide target file)
set(ide_target_extension "other_files")
set(qml_extensions ".qml" ".js")
get_filename_component(resource_extension "${file}" LAST_EXT)
if(resource_extension IN_LIST qml_extensions)
set(ide_target_extension "qml_files")
endif()
set(ide_target ${target}_${ide_target_extension})
set(ide_target ${target}_other_files)
if(NOT TARGET ${ide_target})
add_custom_target(${ide_target} SOURCES "${file}")
else()