summaryrefslogtreecommitdiffstats
path: root/cmake/QtModuleHelpers.cmake
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2022-02-22 16:57:00 +0100
committerAlexandru Croitor <alexandru.croitor@qt.io>2022-02-23 15:17:42 +0100
commit56abd7e4e0ac4a382df01575446138809d031da5 (patch)
tree0d07aa860e215234b9861ba3f776ea575a389528 /cmake/QtModuleHelpers.cmake
parent2f6faca901442631299af0c0d15b3edf257f225b (diff)
CMake: Fix exclusion of QtFoo in QtBarDepends for 3rd party libs
When configuring a static Qt with the -qt-zlib option and the build system creates a 3rd party header module QtZlib, syncqt does not generate a QtZlib header file that would include all its public headers. Then when the QtSvgDepends header is generated, it would add an #include <QtZlib> which would break compilation of the QtSvg PCH file (which compiles QtSvgDepends). We have logic to exclude addition of headers from regular 3rd party static libraries, but not header only 3rd party libraries. Adjust the code to handle header-only 3rd party libraries, as well as make sure it works across repos by exporting the relevant properties. As a drive-by, also rename and export some other informational properties. Amends af00402d6446c0f8f085a2a482fc83c4318aa457 Amends 6fdeaea24f9035ad53ba2548a9467b3264cf01ad Amends be2745e4788cecb0d3122081e3328e4b66923609 Pick-to: 6.2 6.3 Change-Id: I087f50b193dd845e4a5ec906e8851d63122faf80 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Diffstat (limited to 'cmake/QtModuleHelpers.cmake')
-rw-r--r--cmake/QtModuleHelpers.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmake/QtModuleHelpers.cmake b/cmake/QtModuleHelpers.cmake
index 98d8b80d36..11f8eca3bd 100644
--- a/cmake/QtModuleHelpers.cmake
+++ b/cmake/QtModuleHelpers.cmake
@@ -278,7 +278,9 @@ function(qt_internal_add_module target)
endif()
if (arg_SKIP_DEPENDS_INCLUDE)
- set_target_properties(${target} PROPERTIES QT_MODULE_SKIP_DEPENDS_INCLUDE TRUE)
+ set_target_properties(${target} PROPERTIES _qt_module_skip_depends_include TRUE)
+ set_property(TARGET "${target}" APPEND PROPERTY
+ EXPORT_PROPERTIES _qt_module_skip_depends_include)
endif()
if(is_framework)
set_target_properties(${target} PROPERTIES