diff options
author | Alexey Edelev <alexey.edelev@qt.io> | 2021-05-20 14:08:20 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-05-20 19:47:07 +0000 |
commit | 55522636e302e1a5780b7af72272375d1f588615 (patch) | |
tree | b0f79a90597f5d81b267a0093f49ab93cc9d6c85 /cmake | |
parent | 4e58b19b0c1d3d46808b5cc42e147ac7da8a7e21 (diff) |
Do not expose Qt internals by the HEADER_MODULEs
HEADER_MODULEs use the INTERFACE visibility to link libraries. This
causes a transitional propagating of the Qt-internal compile definitions
and options to the user targets.
This commit avoids an implicit adding of the Qt::PlatformModuleInternal
library to the HEADER_MODULEs and stops propagation of the Qt-internal
compile definitions and options. If module wants the transitional
propagation of some properties, this needs to be done explicitly.
Amends 8b7894cb637d21d8fa9bd129849cd23462632d28
Fixes: QTBUG-89951
Change-Id: Ia9cecc38bac98eb5bc6e47d288308b49813ab5ac
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 5b64e5950cf984abb7d47e0802bcb4b5a21e06fa)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/QtModuleHelpers.cmake | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cmake/QtModuleHelpers.cmake b/cmake/QtModuleHelpers.cmake index f9af1758d2..783f138249 100644 --- a/cmake/QtModuleHelpers.cmake +++ b/cmake/QtModuleHelpers.cmake @@ -355,6 +355,7 @@ function(qt_internal_add_module target) QT_BUILD_${module_define_infix}_LIB ### FIXME: use QT_BUILD_ADDON for Add-ons or remove if we don't have add-ons anymore ${deprecation_define} ) + list(APPEND arg_LIBRARIES Qt::PlatformModuleInternal) endif() qt_internal_extend_target("${target}" @@ -370,7 +371,7 @@ function(qt_internal_add_module target) ${arg_DEFINES} ${defines_for_extend_target} PUBLIC_LIBRARIES ${arg_PUBLIC_LIBRARIES} - LIBRARIES ${arg_LIBRARIES} Qt::PlatformModuleInternal + LIBRARIES ${arg_LIBRARIES} PRIVATE_MODULE_INTERFACE ${arg_PRIVATE_MODULE_INTERFACE} FEATURE_DEPENDENCIES ${arg_FEATURE_DEPENDENCIES} DBUS_ADAPTOR_SOURCES ${arg_DBUS_ADAPTOR_SOURCES} |