From 5b64e5950cf984abb7d47e0802bcb4b5a21e06fa Mon Sep 17 00:00:00 2001 From: Alexey Edelev Date: Thu, 20 May 2021 14:08:20 +0200 Subject: [PATCH] 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 Pick-to: 6.1 Fixes: QTBUG-89951 Change-Id: Ia9cecc38bac98eb5bc6e47d288308b49813ab5ac Reviewed-by: Alexandru Croitor --- cmake/QtModuleHelpers.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmake/QtModuleHelpers.cmake b/cmake/QtModuleHelpers.cmake index e53843dc92..bb793f7217 100644 --- a/cmake/QtModuleHelpers.cmake +++ b/cmake/QtModuleHelpers.cmake @@ -440,6 +440,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}" @@ -455,7 +456,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}