summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2020-02-06 13:04:45 +0100
committerAlexandru Croitor <alexandru.croitor@qt.io>2020-02-06 21:43:14 +0000
commitb06f08646013bf3042fa86aa2343447ca8b57cef (patch)
tree2c676157dbe4620a666e1422359e555cc42a4c07
parentb14ee53a089c2edb0583586ab46895948c820320 (diff)
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 <leander.beernaert@qt.io> Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-rw-r--r--cmake/QtBuild.cmake9
1 files changed, 5 insertions, 4 deletions
diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake
index c195ed9b44..85f53fc971 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
- "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>"
- "$<BUILD_INTERFACE:${module_include_dir}/${PROJECT_VERSION}>"
- "$<BUILD_INTERFACE:${module_include_dir}/${PROJECT_VERSION}/${module}>")
+ list(APPEND interface_includes "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>")
if(NOT arg_NO_MODULE_HEADERS)
+ list(APPEND interface_includes
+ "$<BUILD_INTERFACE:${module_include_dir}/${PROJECT_VERSION}>"
+ "$<BUILD_INTERFACE:${module_include_dir}/${PROJECT_VERSION}/${module}>")
+
if(is_framework)
set(fw_headers_dir
"${INSTALL_LIBDIR}/${module}.framework/Headers/")