Fix issues in qt_internal_add_headersclean_target

Avoid using top-level ${target} variable in the function. Align the
module's '_header_check_exceptions' file name, so it should use
_qt_module_interface_name property, but not the qt_module_include_name
proeprty as the prefix.

Amends b89d63515b

Task-number: QTBUG-87480
Change-Id: I1a3ceee1a29f2f4a7cb727310b4fdac63d8144e1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
bb10
Alexey Edelev 2022-10-24 17:22:45 +02:00
parent 97007e1ace
commit d90935f2c2
1 changed files with 4 additions and 4 deletions

View File

@ -34,7 +34,7 @@ function(qt_internal_add_headersclean_target module_target module_headers)
endif()
set(prop_prefix "")
get_target_property(target_type "${target}" TYPE)
get_target_property(target_type "${module_target}" TYPE)
if(target_type STREQUAL "INTERFACE_LIBRARY")
set(prop_prefix "INTERFACE_")
endif()
@ -209,12 +209,12 @@ function(qt_internal_add_headersclean_target module_target module_headers)
" for the headersclean check.")
endif()
get_target_property(module_include_name ${target} _qt_module_include_name)
qt_internal_module_info(module ${module_target})
unset(header_check_exceptions)
if(QT_USE_SYNCQT_CPP)
set(header_check_exceptions
"${CMAKE_CURRENT_BINARY_DIR}/${module_include_name}_header_check_exceptions")
"${CMAKE_CURRENT_BINARY_DIR}/${module}_header_check_exceptions")
endif()
set(headers_check_parameters
"${CMAKE_CURRENT_BINARY_DIR}/${module_target}HeadersCheckParameters${config_suffix}.cmake")
@ -270,7 +270,7 @@ function(qt_internal_add_headersclean_target module_target module_headers)
endforeach()
add_custom_target(${module_target}_headersclean_check
COMMENT "headersclean: Checking headers in ${module_include_name}"
COMMENT "headersclean: Checking headers in ${module}"
DEPENDS ${hclean_artifacts}
VERBATIM)