summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmake/QtBuild.cmake9
1 files changed, 6 insertions, 3 deletions
diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake
index a1b044b97d..6f325adfb4 100644
--- a/cmake/QtBuild.cmake
+++ b/cmake/QtBuild.cmake
@@ -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)
- list(APPEND private_includes
- "$<BUILD_INTERFACE:${module_include_dir}/${PROJECT_VERSION}>"
- "$<BUILD_INTERFACE:${module_include_dir}/${PROJECT_VERSION}/${module}>")
+ # 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