CMake: Don't give plugins PUBLIC usage requirements

The pro2cmake.py conversion script faithfully reproduced the .pro files
for the plugins, which specified the libraries as public. But in CMake,
the implications of this are that public usage requirements should then
be propagated to consumers. We don't expect any consumers, since a
plugin is created as a MODULE library in CMake, so for Windows we don't
even have an import library to link with. The only exception to this is
for static builds where plugins are created as STATIC libraries
instead, but only in certain controlled situations do we then link to
plugins. Even then, usage requirements are not expected to propagate to
the consumers, so these relationships should always be specified as
private.

Pick-to: 6.2
Task-number: QTBUG-90819
Change-Id: Ibc7c2bcd3b6a9dc77df40c4c0c22ff254a80f33d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
bb10
Joerg Bornemann 2021-07-06 18:24:10 +02:00
parent 9e05e25acf
commit 434ada8dcb
7 changed files with 7 additions and 8 deletions

View File

@ -7,7 +7,7 @@ qt_internal_add_plugin(QNetworkManagerNetworkInformationPlugin
qnetworkmanagernetworkinformationbackend.cpp
qnetworkmanagerservice.h
qnetworkmanagerservice.cpp
PUBLIC_LIBRARIES
LIBRARIES
Qt::DBus
Qt::NetworkPrivate
)

View File

@ -15,7 +15,7 @@ qt_internal_add_plugin(QEglFSEmulatorIntegrationPlugin
QT_EGL_NO_X11
INCLUDE_DIRECTORIES
../../api
PUBLIC_LIBRARIES
LIBRARIES
Qt::Core
Qt::CorePrivate
Qt::EglFSDeviceIntegrationPrivate

View File

@ -14,7 +14,7 @@ qt_internal_add_plugin(QEglFSKmsEglDeviceIntegrationPlugin
qeglfskmsegldevicescreen.cpp qeglfskmsegldevicescreen.h
DEFINES
QT_EGL_NO_X11
PUBLIC_LIBRARIES
LIBRARIES
Libdrm::Libdrm
Qt::Core
Qt::CorePrivate

View File

@ -14,7 +14,7 @@ qt_internal_add_plugin(QEglFSX11IntegrationPlugin
QT_EGL_NO_X11
INCLUDE_DIRECTORIES
../../api
PUBLIC_LIBRARIES
LIBRARIES
Qt::Core
Qt::CorePrivate
Qt::EglFSDeviceIntegrationPrivate

View File

@ -10,7 +10,7 @@ qt_internal_add_plugin(QVkKhrDisplayIntegrationPlugin
qvkkhrdisplayvulkaninstance.cpp qvkkhrdisplayvulkaninstance.h
DEFINES
QT_NO_FOREACH
PUBLIC_LIBRARIES
LIBRARIES
Qt::Core
Qt::CorePrivate
Qt::FbSupportPrivate

View File

@ -12,6 +12,6 @@ qt_internal_add_plugin(QTlsBackendCertOnlyPlugin
../shared/qasn1element.cpp
qtlsbackend_cert.cpp
qtlsbackend_cert_p.h
PUBLIC_LIBRARIES
LIBRARIES
Qt::NetworkPrivate
)

View File

@ -14,7 +14,7 @@ qt_internal_add_plugin(QTlsBackendOpenSSLPlugin
qsslcontext_openssl.cpp qsslcontext_openssl_p.h
qsslsocket_openssl_symbols.cpp qsslsocket_openssl_symbols_p.h
qopenssl_p.h
PUBLIC_LIBRARIES
LIBRARIES
Qt::NetworkPrivate
Qt::CorePrivate
DEFINES
@ -48,4 +48,3 @@ qt_internal_extend_target(QTlsBackendOpenSSLPlugin CONDITION QT_FEATURE_openssl
LIBRARIES
crypt32
)