summaryrefslogtreecommitdiffstats
path: root/src/plugins/generic
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@qt.io>2021-02-10 12:11:39 +1100
committerCraig Scott <craig.scott@qt.io>2021-02-24 10:37:49 +1100
commitfe29159aad0e03ca5eebabf910c90f279b222d03 (patch)
tree3112b7e303f2ff2ee2ad6fed834cb0fbdb708815 /src/plugins/generic
parent1f30bcf33618ca39c47dc1058529b55635e30aef (diff)
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. This change warns on any PUBLIC usage requirements specified for a plugin. This check is disabled by default to avoid spamming CI builds for repos that haven't been fixed yet. The check can be enabled by a CMake cache option, which is intended for developers to use locally when fixing this issue in other repos (all plugins in qtbase should not trigger this warning as a result of changes in this commit). Task-number: QTBUG-90819 Pick-to: 6.1 Change-Id: I09f2c8da77db1193ad3370f85d367dfc6ab7b9a6 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/plugins/generic')
-rw-r--r--src/plugins/generic/evdevkeyboard/CMakeLists.txt2
-rw-r--r--src/plugins/generic/evdevmouse/CMakeLists.txt2
-rw-r--r--src/plugins/generic/evdevtablet/CMakeLists.txt2
-rw-r--r--src/plugins/generic/evdevtouch/CMakeLists.txt2
-rw-r--r--src/plugins/generic/libinput/CMakeLists.txt2
-rw-r--r--src/plugins/generic/tslib/CMakeLists.txt2
-rw-r--r--src/plugins/generic/tuiotouch/CMakeLists.txt2
7 files changed, 7 insertions, 7 deletions
diff --git a/src/plugins/generic/evdevkeyboard/CMakeLists.txt b/src/plugins/generic/evdevkeyboard/CMakeLists.txt
index c6411cd76a..7134a2d858 100644
--- a/src/plugins/generic/evdevkeyboard/CMakeLists.txt
+++ b/src/plugins/generic/evdevkeyboard/CMakeLists.txt
@@ -10,7 +10,7 @@ qt_internal_add_plugin(QEvdevKeyboardPlugin
DEFAULT_IF FALSE
SOURCES
main.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Core
Qt::CorePrivate
Qt::Gui
diff --git a/src/plugins/generic/evdevmouse/CMakeLists.txt b/src/plugins/generic/evdevmouse/CMakeLists.txt
index 39741fbe25..78cf80f588 100644
--- a/src/plugins/generic/evdevmouse/CMakeLists.txt
+++ b/src/plugins/generic/evdevmouse/CMakeLists.txt
@@ -10,7 +10,7 @@ qt_internal_add_plugin(QEvdevMousePlugin
DEFAULT_IF FALSE
SOURCES
main.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Core
Qt::CorePrivate
Qt::Gui
diff --git a/src/plugins/generic/evdevtablet/CMakeLists.txt b/src/plugins/generic/evdevtablet/CMakeLists.txt
index da553f9b47..880090dd02 100644
--- a/src/plugins/generic/evdevtablet/CMakeLists.txt
+++ b/src/plugins/generic/evdevtablet/CMakeLists.txt
@@ -10,7 +10,7 @@ qt_internal_add_plugin(QEvdevTabletPlugin
DEFAULT_IF FALSE
SOURCES
main.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Core
Qt::CorePrivate
Qt::Gui
diff --git a/src/plugins/generic/evdevtouch/CMakeLists.txt b/src/plugins/generic/evdevtouch/CMakeLists.txt
index ce0b931e9c..d15367c6c2 100644
--- a/src/plugins/generic/evdevtouch/CMakeLists.txt
+++ b/src/plugins/generic/evdevtouch/CMakeLists.txt
@@ -10,7 +10,7 @@ qt_internal_add_plugin(QEvdevTouchScreenPlugin
DEFAULT_IF FALSE
SOURCES
main.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Core
Qt::CorePrivate
Qt::Gui
diff --git a/src/plugins/generic/libinput/CMakeLists.txt b/src/plugins/generic/libinput/CMakeLists.txt
index a37b898d5a..79da268510 100644
--- a/src/plugins/generic/libinput/CMakeLists.txt
+++ b/src/plugins/generic/libinput/CMakeLists.txt
@@ -10,7 +10,7 @@ qt_internal_add_plugin(QLibInputPlugin
DEFAULT_IF FALSE
SOURCES
main.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Core
Qt::CorePrivate
Qt::Gui
diff --git a/src/plugins/generic/tslib/CMakeLists.txt b/src/plugins/generic/tslib/CMakeLists.txt
index b151805108..9a6e368825 100644
--- a/src/plugins/generic/tslib/CMakeLists.txt
+++ b/src/plugins/generic/tslib/CMakeLists.txt
@@ -12,7 +12,7 @@ qt_internal_add_plugin(QTsLibPlugin
DEFAULT_IF FALSE
SOURCES
main.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
PkgConfig::Tslib
Qt::Core
Qt::CorePrivate
diff --git a/src/plugins/generic/tuiotouch/CMakeLists.txt b/src/plugins/generic/tuiotouch/CMakeLists.txt
index ede5c5408a..b572b140b4 100644
--- a/src/plugins/generic/tuiotouch/CMakeLists.txt
+++ b/src/plugins/generic/tuiotouch/CMakeLists.txt
@@ -17,7 +17,7 @@ qt_internal_add_plugin(QTuioTouchPlugin
qtuiotoken_p.h
DEFINES
QT_NO_FOREACH
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Core
Qt::CorePrivate
Qt::Gui