From 69004cb2900dcfc530e1e2efb783f559661a8a50 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Mon, 7 Sep 2020 17:28:00 +0200 Subject: [PATCH] Do not expose xlib as public dependency of QtGui Consumers of QtGui should link explicitly to xlib if needed. Fixes: QTBUG-86421 Change-Id: Ibc94eb1c1ac405b53749b320c388b037bf693a08 Reviewed-by: Alexandru Croitor --- src/gui/.prev_CMakeLists.txt | 2 +- src/gui/CMakeLists.txt | 2 +- src/gui/opengl/platform/unix/unix.pri | 2 +- src/plugins/platforms/offscreen/.prev_CMakeLists.txt | 2 ++ src/plugins/platforms/offscreen/CMakeLists.txt | 2 ++ src/plugins/platforms/offscreen/offscreen.pro | 1 + 6 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/gui/.prev_CMakeLists.txt b/src/gui/.prev_CMakeLists.txt index 65780b44cfc..5b4c581bed2 100644 --- a/src/gui/.prev_CMakeLists.txt +++ b/src/gui/.prev_CMakeLists.txt @@ -698,7 +698,7 @@ qt_extend_target(Gui CONDITION QT_FEATURE_undogroup qt_extend_target(Gui CONDITION QT_FEATURE_opengl AND QT_FEATURE_xlib AND NOT QT_FEATURE_opengles2 SOURCES opengl/platform/unix/qglxconvenience.cpp opengl/platform/unix/qglxconvenience_p.h - PUBLIC_LIBRARIES + LIBRARIES X11::X11 ) diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 1804991a7a6..dc7d28d0f15 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -820,7 +820,7 @@ qt_extend_target(Gui CONDITION QT_FEATURE_undogroup qt_extend_target(Gui CONDITION QT_FEATURE_opengl AND QT_FEATURE_xlib AND NOT QT_FEATURE_opengles2 SOURCES opengl/platform/unix/qglxconvenience.cpp opengl/platform/unix/qglxconvenience_p.h - PUBLIC_LIBRARIES + LIBRARIES X11::X11 ) diff --git a/src/gui/opengl/platform/unix/unix.pri b/src/gui/opengl/platform/unix/unix.pri index 7acc5891146..6365a18756a 100644 --- a/src/gui/opengl/platform/unix/unix.pri +++ b/src/gui/opengl/platform/unix/unix.pri @@ -4,4 +4,4 @@ HEADERS += \ SOURCES += \ opengl/platform/unix/qglxconvenience.cpp -QMAKE_USE += xlib +QMAKE_USE_PRIVATE += xlib diff --git a/src/plugins/platforms/offscreen/.prev_CMakeLists.txt b/src/plugins/platforms/offscreen/.prev_CMakeLists.txt index c69719dda74..319502ccc6a 100644 --- a/src/plugins/platforms/offscreen/.prev_CMakeLists.txt +++ b/src/plugins/platforms/offscreen/.prev_CMakeLists.txt @@ -30,6 +30,8 @@ qt_internal_add_plugin(QOffscreenIntegrationPlugin qt_extend_target(QOffscreenIntegrationPlugin CONDITION QT_FEATURE_opengl AND QT_FEATURE_xlib AND NOT QT_FEATURE_opengles2 SOURCES qoffscreenintegration_x11.cpp qoffscreenintegration_x11.h + LIBRARIES + X11::X11 ) #### Keys ignored in scope 3:.:.:offscreen.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN: diff --git a/src/plugins/platforms/offscreen/CMakeLists.txt b/src/plugins/platforms/offscreen/CMakeLists.txt index ee738851e53..7a312701c69 100644 --- a/src/plugins/platforms/offscreen/CMakeLists.txt +++ b/src/plugins/platforms/offscreen/CMakeLists.txt @@ -31,6 +31,8 @@ qt_internal_add_plugin(QOffscreenIntegrationPlugin qt_extend_target(QOffscreenIntegrationPlugin CONDITION QT_FEATURE_opengl AND QT_FEATURE_xlib AND NOT QT_FEATURE_opengles2 SOURCES qoffscreenintegration_x11.cpp qoffscreenintegration_x11.h + LIBRARIES + X11::X11 ) #### Keys ignored in scope 3:.:.:offscreen.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN: diff --git a/src/plugins/platforms/offscreen/offscreen.pro b/src/plugins/platforms/offscreen/offscreen.pro index 8b11e5ca749..6be725af7e0 100644 --- a/src/plugins/platforms/offscreen/offscreen.pro +++ b/src/plugins/platforms/offscreen/offscreen.pro @@ -19,6 +19,7 @@ OTHER_FILES += offscreen.json qtConfig(xlib):qtConfig(opengl):!qtConfig(opengles2) { SOURCES += qoffscreenintegration_x11.cpp HEADERS += qoffscreenintegration_x11.h + QMAKE_USE_PRIVATE += xlib } PLUGIN_TYPE = platforms