CMake: better GLX detection

Change-Id: I71dfbb331cb02a3249b0c3c65f2a9bd9ce68c739
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
bb10
Ville Voutilainen 2019-05-02 17:23:29 +03:00 committed by Tobias Hunger
parent ef3e37b9a3
commit 1361cf5d50
2 changed files with 7 additions and 3 deletions

View File

@ -44,7 +44,7 @@ if(QT_FEATURE_opengl)
add_subdirectory(platformcompositor)
endif()
if (QT_FEATURE_xlib AND QT_FEATURE_opengl AND (NOT QT_FEATURE_opengles2))
if (QT_FEATURE_xlib AND QT_FEATURE_opengl AND TARGET OpenGL::GLX) # special case
add_subdirectory(glxconvenience)
endif()

View File

@ -33,7 +33,7 @@ add_qt_plugin(qoffscreen
## Scopes:
#####################################################################
extend_target(qoffscreen CONDITION QT_FEATURE_opengl AND QT_FEATURE_xlib AND NOT QT_FEATURE_opengles2
extend_target(qoffscreen CONDITION QT_FEATURE_opengl AND QT_FEATURE_xlib AND TARGET OpenGL::GLX # special case
SOURCES
qoffscreenintegration_x11.cpp qoffscreenintegration_x11.h
LIBRARIES
@ -42,5 +42,9 @@ extend_target(qoffscreen CONDITION QT_FEATURE_opengl AND QT_FEATURE_xlib AND NOT
Qt::GlxSupport
)
#### Keys ignored in scope 3:.:.:./offscreen.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN:
extend_target(qoffscreen CONDITION NOT TARGET OpenGL::GLX OR NOT QT_FEATURE_opengl OR NOT QT_FEATURE_xlib # special case
SOURCES
qoffscreenintegration_dummy.cpp
)
# PLUGIN_EXTENDS = "-"