From b06f08646013bf3042fa86aa2343447ca8b57cef Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Thu, 6 Feb 2020 13:04:45 +0100 Subject: [PATCH] Don't add private module headers for private modules when not needed If a module has the NO_MODULE_HEADERS option, we should not add the private module header paths to the BUILD_INTERFACE of private modules. This fixes building static non-prefix qtdeclarative builds on Linux, where non-existent QtXcbQpa headers failed the qtdeclarative generation step. Change-Id: Ic9fdd8c5688d3449576eb8a5dd852c252e29bf5b Reviewed-by: Leander Beernaert Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor --- cmake/QtBuild.cmake | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake index c195ed9b44f..85f53fc9718 100644 --- a/cmake/QtBuild.cmake +++ b/cmake/QtBuild.cmake @@ -1949,12 +1949,13 @@ set(QT_CMAKE_EXPORT_NAMESPACE ${QT_CMAKE_EXPORT_NAMESPACE})") # Handle cases like QmlDevTools which do not have their own headers, but rather borrow them # from another module. if(NOT arg_NO_SYNC_QT) - list(APPEND interface_includes - "$" - "$" - "$") + list(APPEND interface_includes "$") if(NOT arg_NO_MODULE_HEADERS) + list(APPEND interface_includes + "$" + "$") + if(is_framework) set(fw_headers_dir "${INSTALL_LIBDIR}/${module}.framework/Headers/")