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: Ia7a8f27d4eecf067055511577ec664ad857905cd
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Joerg Bornemann 2021-07-06 18:24:11 +02:00
parent 46641fddcd
commit 80c336554d
11 changed files with 12 additions and 12 deletions

View File

@ -9,7 +9,7 @@ qt_internal_add_plugin(QWaylandBradientDecorationPlugin
TYPE wayland-decoration-client
SOURCES
main.cpp
PUBLIC_LIBRARIES
LIBRARIES
Qt::Core
Qt::Gui
Qt::WaylandClientPrivate

View File

@ -12,7 +12,7 @@ qt_internal_add_plugin(DmaBufServerBufferPlugin
main.cpp
INCLUDE_DIRECTORIES
../../../../hardwareintegration/client/dmabuf-server
PUBLIC_LIBRARIES
LIBRARIES
EGL::EGL
Qt::Core
Qt::Gui

View File

@ -12,7 +12,7 @@ qt_internal_add_plugin(DrmEglServerBufferPlugin
main.cpp
INCLUDE_DIRECTORIES
../../../../hardwareintegration/client/drm-egl-server
PUBLIC_LIBRARIES
LIBRARIES
EGL::EGL
Qt::Core
Qt::Gui

View File

@ -12,7 +12,7 @@ qt_internal_add_plugin(ShmServerBufferPlugin
main.cpp
INCLUDE_DIRECTORIES
../../../../hardwareintegration/client/shm-emulation-server
PUBLIC_LIBRARIES
LIBRARIES
Qt::Core
Qt::Gui
Qt::OpenGL

View File

@ -12,7 +12,7 @@ qt_internal_add_plugin(VulkanServerBufferPlugin
main.cpp
INCLUDE_DIRECTORIES
../../../../hardwareintegration/client/vulkan-server
PUBLIC_LIBRARIES
LIBRARIES
Qt::Core
Qt::Gui
Qt::OpenGL

View File

@ -10,7 +10,7 @@ qt_internal_add_plugin(QWaylandEglClientBufferPlugin
TYPE wayland-graphics-integration-client
SOURCES
main.cpp
PUBLIC_LIBRARIES
LIBRARIES
Qt::Core
Qt::Gui
Qt::WaylandClientPrivate

View File

@ -17,7 +17,7 @@ qt_internal_add_plugin(QWaylandXCompositeEglClientBufferPlugin
INCLUDE_DIRECTORIES
../../../../hardwareintegration/client/xcomposite-egl
../../../../hardwareintegration/client/xcomposite_share
PUBLIC_LIBRARIES
LIBRARIES
EGL::EGL
PkgConfig::XComposite
Qt::Core

View File

@ -16,7 +16,7 @@ qt_internal_add_plugin(QWaylandXCompositeGlxClientBufferPlugin
INCLUDE_DIRECTORIES
../../../../hardwareintegration/client/xcomposite-glx
../../../../hardwareintegration/client/xcomposite_share
PUBLIC_LIBRARIES
LIBRARIES
${CMAKE_DL_LIBS}
PkgConfig::XComposite
Qt::Core

View File

@ -11,7 +11,7 @@ qt_internal_add_plugin(QWaylandFullScreenShellV1IntegrationPlugin
main.cpp
qwaylandfullscreenshellv1integration.cpp qwaylandfullscreenshellv1integration.h
qwaylandfullscreenshellv1surface.cpp qwaylandfullscreenshellv1surface.h
PUBLIC_LIBRARIES
LIBRARIES
Qt::Core
Qt::Gui
Qt::GuiPrivate

View File

@ -10,7 +10,7 @@ qt_internal_add_module(WlShellIntegrationPrivate
SOURCES
qwaylandwlshellintegration.cpp qwaylandwlshellintegration_p.h
qwaylandwlshellsurface.cpp qwaylandwlshellsurface_p.h
PUBLIC_LIBRARIES
LIBRARIES
Qt::GuiPrivate
Qt::WaylandClientPrivate
Wayland::Client
@ -42,7 +42,7 @@ qt_internal_add_plugin(QWaylandWlShellIntegrationPlugin
TYPE wayland-shell-integration
SOURCES
main.cpp
PUBLIC_LIBRARIES
LIBRARIES
Qt::GuiPrivate
Qt::WaylandClientPrivate
Qt::WlShellIntegrationPrivate

View File

@ -12,7 +12,7 @@ qt_internal_add_plugin(QWaylandXdgShellIntegrationPlugin
qwaylandxdgdecorationv1.cpp qwaylandxdgdecorationv1_p.h
qwaylandxdgshell.cpp qwaylandxdgshell_p.h
qwaylandxdgshellintegration.cpp qwaylandxdgshellintegration_p.h
PUBLIC_LIBRARIES
LIBRARIES
Qt::Core
Qt::Gui
Qt::GuiPrivate