Don't export private include paths if there are no private includes
Needed when building Qt Creator with CMake + Qt6 non-prefix build. Specifically qttools's QtUiPlugin does not have any private headers, but the non-existing include path was exported, which caused an error when configuring Qt Creator. Change-Id: I662bc502fe3134fba083bde273b7f63fe1470277 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
715465a93b
commit
9eea24ed60
@ -1462,9 +1462,12 @@ function(qt_add_module target)
|
||||
# Handle cases like QmlDevTools which do not have their own headers, but rather borrow them
|
||||
# from another module.
|
||||
if(NOT arg_NO_SYNC_QT AND NOT arg_NO_MODULE_HEADERS)
|
||||
# Don't include private headers unless they exist, aka syncqt created them.
|
||||
if(module_headers_private)
|
||||
list(APPEND private_includes
|
||||
"$<BUILD_INTERFACE:${module_include_dir}/${PROJECT_VERSION}>"
|
||||
"$<BUILD_INTERFACE:${module_include_dir}/${PROJECT_VERSION}/${module}>")
|
||||
endif()
|
||||
|
||||
list(APPEND public_includes
|
||||
# For the syncqt headers
|
||||
|
Loading…
x
Reference in New Issue
Block a user