headersclean: Fix include paths for dependent modules

Having ${QT_BUILD_DIR}/include as include path is not enough for
modules outside of qtbase. They also need to pick up headers from e.g.
Qt Core, which are available only in "${CMAKE_INSTALL_PREFIX}/include"

This amends db21bad936a761f475145886f1e06dfcfa11eb80

Fixes: QTBUG-82615
Change-Id: Ib003a66ce039bf1ab6e21a3b1cd86923207eb3db
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Kai Koehne 2020-09-21 15:51:40 +02:00
parent 5f198584e2
commit 3b6ef98d7a

View File

@ -91,7 +91,8 @@ function(qt_internal_add_headers_clean_target
OUTPUT "${artifact_path}"
COMMENT "headersclean: Checking header ${header}"
COMMAND "${CMAKE_CXX_COMPILER}" -c ${CMAKE_CXX_FLAGS} ${hcleanFLAGS}
-I "${QT_BUILD_DIR}/include" ${hcleanDEFS} -xc++ "${input_path}"
-I "${QT_BUILD_DIR}/include" -I "${CMAKE_INSTALL_PREFIX}/include"
${hcleanDEFS} -xc++ "${input_path}"
-o${artifact_path}
IMPLICIT_DEPENDS CXX
VERBATIM)
@ -115,7 +116,8 @@ function(qt_internal_add_headers_clean_target
OUTPUT "${artifact_path}"
COMMENT "headersclean: Checking header ${header}"
COMMAND "${CMAKE_CXX_COMPILER}" -nologo -c ${CMAKE_CXX_FLAGS} ${hcleanFLAGS}
-I "${QT_BUILD_DIR}/include" ${hcleanDEFS} -FI "${input_path}"
-I "${QT_BUILD_DIR}/include" -I "${CMAKE_INSTALL_PREFIX}/include"
${hcleanDEFS} -FI "${input_path}"
-Fo${artifact_path} "${source_path}"
IMPLICIT_DEPENDS CXX
VERBATIM)